Skip to content

Commit a00432f

Browse files
nbd168gregkh
authored andcommitted
mac80211: do not drop tx nulldata packets on encrypted links
commit 2463ec8 upstream. 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: a0761a3 ("mac80211: drop data frames without key on encrypted links") Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a6d508c commit a00432f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/tx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
662662
if (!skip_hw && tx->key &&
663663
tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
664664
info->control.hw_key = &tx->key->conf;
665-
} else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta &&
665+
} else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta &&
666666
test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) {
667667
return TX_DROP;
668668
}

0 commit comments

Comments
 (0)