Skip to content

Commit

Permalink
mac80211: do not drop tx nulldata packets on encrypted links
Browse files Browse the repository at this point in the history
Fixes sending out nulldata probing frames

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Dec 18, 2020
1 parent 5950397 commit 3ab6953
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From: Felix Fietkau <[email protected]>
Date: Fri, 18 Dec 2020 20:08:06 +0100
Subject: [PATCH] mac80211: do not drop tx nulldata packets on encrypted links

ieee80211_tx_h_select_key drops any non-mgmt packets without a key when
encryption is used. This is wrong for nulldata packets that can't be
encrypted and are sent out for probing clients and indicating 4-address
mode.

Reported-by: Sebastian Gottschall <[email protected]>
Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links")
Signed-off-by: Felix Fietkau <[email protected]>
---

--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -657,7 +657,7 @@ ieee80211_tx_h_select_key(struct ieee802
if (!skip_hw && tx->key &&
tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
info->control.hw_key = &tx->key->conf;
- } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta &&
+ } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta &&
test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) {
return TX_DROP;
}

0 comments on commit 3ab6953

Please sign in to comment.