mv643xx_eth: check for valid hw address
Subsystems (2)
PATCH 1/1 mv643xx_eth: check for valid hw address
Check for valid hw address.
---drivers/net/mv643xx_eth.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/mv643xx_eth.c +3 -0
@@ -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 -EADDRNOTAVAIL ; +memcpy (dev->dev_addr, sa->sa_data,ETH_ALEN );netif_addr_lock_bh (dev);
David Miller
maintainerFrom: "Denis Kirjanov <[email protected]" <[email protected]>
Date: Fri, 4 Dec 2009 14:51:38 +0300
Quoted 3 lines
Check for valid hw address.
Signed-off-by Denis Kirjanov <[email protected]>
Assuming we don't accept your other patch this needs to return -EINVAL.
PATCH 1/1 mv643xx_eth: check for valid hw address (resubmit)
Quoted 9 lines · David Miller
From: "Denis Kirjanov <[email protected]" <[email protected]>
Date: Fri, 4 Dec 2009 14:51:38 +0300Quoted 3 lines
Check for valid hw address.
Signed-off-by Denis Kirjanov <[email protected]>Assuming we don't accept your other patch this needs to return
-EINVAL.
(resubmitted due the fix in the return value)
Check for valid hw address.
---
drivers/net/mv643xx_eth.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/mv643xx_eth.c +3 -0
@@ -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);
Re: [PATCH] mv643xx_eth: check for valid hw address (resubmit)
From: "Denis Kirjanov <[email protected]" <[email protected]>
Date: Sun, 6 Dec 2009 13:36:33 +0300
Quoted 3 lines
Check for valid hw address.
Signed-off-by Denis Kirjanov <[email protected]>
Applied.