Skip to content

Commit

Permalink
mv643xx_eth: check for valid hw address (resubmit)
Browse files Browse the repository at this point in the history
Check for valid hw address.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Dec 9, 2009
1 parent 64f1660 commit a29ec08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a29ec08

Please sign in to comment.