diff options
author | Denis Kirjanov <kirjanov@gmail.com> | 2009-12-08 20:36:00 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 20:36:00 -0800 |
commit | a29ec08a1b649436248c140a3bc389bc11434c94 (patch) | |
tree | 1c40d2acfc389648330ade1cc66b7abd7e6c4e80 /drivers/net | |
parent | 64f16603eae17e869d5fc8a60ae987394190e639 (diff) | |
download | kernel_samsung_crespo-a29ec08a1b649436248c140a3bc389bc11434c94.zip kernel_samsung_crespo-a29ec08a1b649436248c140a3bc389bc11434c94.tar.gz kernel_samsung_crespo-a29ec08a1b649436248c140a3bc389bc11434c94.tar.bz2 |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 796a493..1405a17 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -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); |