summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2024-11-15 12:58:50 +0100
committerJohannes Berg <johannes.berg@intel.com>2024-12-03 11:28:59 +0100
commit52cebabb1264a51c80b2461d52e71600c1c58df2 (patch)
tree12e8a0f627e2d0090ec136e8400050821a00c3bc /include/net
parent11ac0d7c3b5ba58232fb7dacb54371cbe75ec183 (diff)
wifi: mac80211: fix vif addr when switching from monitor to station
Since adding support for opting out of virtual monitor support, a zero vif addr was used to indicate passive vs active monitor to the driver. This would break the vif->addr when changing the netdev mac address before switching the interface from monitor to sta mode. Fix the regression by adding a separate flag to indicate whether vif->addr is valid. Reported-by: syzbot+9ea265d998de25ac6a46@syzkaller.appspotmail.com Fixes: 9d40f7e32774 ("wifi: mac80211: add flag to opt out of virtual monitor support") Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://patch.msgid.link/20241115115850.37449-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index adc2dd813a4a..ab8dce1f2c27 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1987,6 +1987,8 @@ enum ieee80211_neg_ttlm_res {
* @neg_ttlm: negotiated TID to link mapping info.
* see &struct ieee80211_neg_ttlm.
* @addr: address of this interface
+ * @addr_valid: indicates if the address is actively used. Set to false for
+ * passive monitor interfaces, true in all other cases.
* @p2p: indicates whether this AP or STA interface is a p2p
* interface, i.e. a GO or p2p-sta respectively
* @netdev_features: tx netdev features supported by the hardware for this
@@ -2026,6 +2028,7 @@ struct ieee80211_vif {
u16 valid_links, active_links, dormant_links, suspended_links;
struct ieee80211_neg_ttlm neg_ttlm;
u8 addr[ETH_ALEN] __aligned(2);
+ bool addr_valid;
bool p2p;
u8 cab_queue;