mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue