forked from Minki/linux
mv643xx_eth: check for valid hw address (resubmit)
Check for valid hw address. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
64f16603ea
commit
a29ec08a1b
@ -1827,6 +1827,9 @@ static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
|
||||
{
|
||||
struct sockaddr *sa = addr;
|
||||
|
||||
if (!is_valid_ether_addr(sa->sa_data))
|
||||
return -EINVAL;
|
||||
|
||||
memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
|
||||
|
||||
netif_addr_lock_bh(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user