OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
203fe0d
)
staging: slicoss Check for valid hw address
author
kirjanov@gmail.com
<kirjanov@gmail.com>
Fri, 18 Dec 2009 07:52:45 +0000
(10:52 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 4 Mar 2010 00:42:28 +0000
(16:42 -0800)
Check for valid hw address.
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/slicoss/slicoss.c
patch
|
blob
|
history
diff --git
a/drivers/staging/slicoss/slicoss.c
b/drivers/staging/slicoss/slicoss.c
index
a18eeb6
..
9c8eb09
100644
(file)
--- a/
drivers/staging/slicoss/slicoss.c
+++ b/
drivers/staging/slicoss/slicoss.c
@@
-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);