OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d2a254
)
mac80211: Reject zero MAC address in sta_info_insert_check()
author
YueHaibing
<yuehaibing@huawei.com>
Sat, 26 Jun 2021 13:03:34 +0000
(21:03 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 13 Aug 2021 07:50:43 +0000
(09:50 +0200)
As commit
52dba8d7d5ab
("mac80211: reject zero MAC address in add station")
said, we don't consider all-zeroes to be a valid MAC address in most places,
so also reject it here.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link:
https://lore.kernel.org/r/20210626130334.13624-1-yuehaibing@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c
patch
|
blob
|
history
diff --git
a/net/mac80211/sta_info.c
b/net/mac80211/sta_info.c
index
a5505ee
..
2b5acb3
100644
(file)
--- a/
net/mac80211/sta_info.c
+++ b/
net/mac80211/sta_info.c
@@
-543,7
+543,7
@@
static int sta_info_insert_check(struct sta_info *sta)
return -ENETDOWN;
if (WARN_ON(ether_addr_equal(sta->sta.addr, sdata->vif.addr) ||
-
is_multicast
_ether_addr(sta->sta.addr)))
+
!is_valid
_ether_addr(sta->sta.addr)))
return -EINVAL;
/* The RCU read lock is required by rhashtable due to