wifi: mac80211_hwsim: warn on invalid link address
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 Sep 2022 14:12:39 +0000 (16:12 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 3 Sep 2022 15:03:39 +0000 (17:03 +0200)
Catch the bugs fixed in mac80211 by the previous commits
and warn if an invalid address is added (or removed).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 70a72a0..a75420d 100644 (file)
@@ -1299,6 +1299,8 @@ static void mac80211_hwsim_config_mac_nl(struct ieee80211_hw *hw,
        struct sk_buff *skb;
        void *msg_head;
 
+       WARN_ON(!is_valid_ether_addr(addr));
+
        if (!_portid && !hwsim_virtio_enabled)
                return;