aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-12-18 22:58:10 +0100
committerFelix Fietkau <nbd@nbd.name>2020-12-18 23:05:50 +0100
commit3ab695368a5c8dc6228055bd05bd05f1974d818c (patch)
tree67a3c86a38ac78e10f6be5dd026eaea7150a7cc0
parent5950397e1486548c2736d653fdf177e986b3e896 (diff)
downloadupstream-3ab695368a5c8dc6228055bd05bd05f1974d818c.tar.gz
upstream-3ab695368a5c8dc6228055bd05bd05f1974d818c.tar.bz2
upstream-3ab695368a5c8dc6228055bd05bd05f1974d818c.zip
mac80211: do not drop tx nulldata packets on encrypted links
Fixes sending out nulldata probing frames Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch
new file mode 100644
index 0000000000..378c37455d
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch
@@ -0,0 +1,25 @@
+From: Felix Fietkau <nbd@nbd.name>
+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 <s.gottschall@dd-wrt.com>
+Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links")
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- 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;
+ }
150' href='#n150'>150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220