staging: slicoss Check for valid hw address
Check for valid hw address. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
203fe0d2e9
commit
a71b997881
|
@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr)
|
|||
if (!adapter)
|
||||
return -EBUSY;
|
||||
|
||||
if (!is_valid_ether_addr(addr->sa_data))
|
||||
return -EINVAL;
|
||||
|
||||
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
|
||||
memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len);
|
||||
|
||||
|
|
Loading…
Reference in New Issue