mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
wifi: mac80211: drop robust action frames before assoc
To be able to more easily understand the code, drop robust action frames before being associated, even if there's no MFP in the end, as they are Class 3 Frames and shouldn't be transmitted in the first place. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20231001125722.b2fd37083371.Ie9f4906e2f6c698989bce6681956ed2f9454f27c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e4e7e3af73
commit
f3bd593278
1 changed files with 9 additions and 0 deletions
|
@ -2474,6 +2474,15 @@ ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
|
|||
return RX_DROP_U_UNPROT_UNICAST_PUB_ACTION;
|
||||
}
|
||||
|
||||
/*
|
||||
* Drop robust action frames before assoc regardless of MFP state,
|
||||
* after assoc we also have decided on MFP or not.
|
||||
*/
|
||||
if (ieee80211_is_action(fc) &&
|
||||
ieee80211_is_robust_mgmt_frame(rx->skb) &&
|
||||
(!rx->sta || !test_sta_flag(rx->sta, WLAN_STA_ASSOC)))
|
||||
return RX_DROP_U_UNPROT_ROBUST_ACTION;
|
||||
|
||||
return RX_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue