mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
mac80211: Reject zero MAC address in sta_info_insert_check()
As commit 52dba8d7d5
("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>
This commit is contained in:
parent
3d2a2544ea
commit
deebea0ae3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user