Commit e3efca0a authored by Jouni Malinen's avatar Jouni Malinen Committed by John W. Linville

mac80211: Fix drop_unencrypted for MFP with hwaccel

Commit bef5d1c7 split
ieee80211_drop_unencrypted() into separate functions that are used for
Data and Management frames. However, it did not handle the
RX_FLAG_DECRYPTED correctly for Management frames:
ieee80211_drop_unencrypted() can only return 0 for Management frames,
so there is no point in calling it here. Instead, just check the
status->flag directly.
Signed-off-by: default avatarJouni Malinen <j@w1.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9fd1ea42
...@@ -1408,12 +1408,15 @@ static int ...@@ -1408,12 +1408,15 @@ static int
ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx) ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
__le16 fc = hdr->frame_control; __le16 fc = hdr->frame_control;
int res;
res = ieee80211_drop_unencrypted(rx, fc); /*
if (unlikely(res)) * Pass through unencrypted frames if the hardware has
return res; * decrypted them already.
*/
if (status->flag & RX_FLAG_DECRYPTED)
return 0;
if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) { if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) && if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment