summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2021-06-26 21:03:34 +0800
committerJohannes Berg <johannes.berg@intel.com>2021-08-13 09:50:43 +0200
commitdeebea0ae3f7c1f812ff6b3581dc51445e1be942 (patch)
tree51d6b2c879520f6086cccb1d39060138b7a89945 /net/mac80211
parent3d2a2544eae93987f0688c2d6ec06c76f9e1477b (diff)
downloadlinux-deebea0ae3f7c1f812ff6b3581dc51445e1be942.tar.bz2
mac80211: Reject zero MAC address in sta_info_insert_check()
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/sta_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a5505ee51229..2b5acb37587f 100644
--- 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