Skip to content

Commit f3bd593

Browse files
committed
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 <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20231001125722.b2fd37083371.Ie9f4906e2f6c698989bce6681956ed2f9454f27c@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent e4e7e3a commit f3bd593

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

net/mac80211/rx.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,6 +2474,15 @@ ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
24742474
return RX_DROP_U_UNPROT_UNICAST_PUB_ACTION;
24752475
}
24762476

2477+
/*
2478+
* Drop robust action frames before assoc regardless of MFP state,
2479+
* after assoc we also have decided on MFP or not.
2480+
*/
2481+
if (ieee80211_is_action(fc) &&
2482+
ieee80211_is_robust_mgmt_frame(rx->skb) &&
2483+
(!rx->sta || !test_sta_flag(rx->sta, WLAN_STA_ASSOC)))
2484+
return RX_DROP_U_UNPROT_ROBUST_ACTION;
2485+
24772486
return RX_CONTINUE;
24782487
}
24792488

0 commit comments

Comments
 (0)