From: Johannes Berg Date: Fri, 2 Sep 2022 14:12:39 +0000 (+0200) Subject: wifi: mac80211_hwsim: warn on invalid link address X-Git-Tag: v6.1-rc1~170^2~266^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=419bd7a7aa4972b0c761707bf36c4021ddc34c4f;p=thirdparty%2Fkernel%2Flinux.git wifi: mac80211_hwsim: warn on invalid link address 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 --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 70a72a03398ae..a75420d92816a 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -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;