aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-09-29 16:09:17 +0200
committerFelix Fietkau <nbd@nbd.name>2018-09-29 16:09:17 +0200
commitb115fcaa8650b451e8e7f9c1c913be2652cfd10f (patch)
tree0b25695123ba4c7d9e7fdad0ff4eeae73a46897d /package
parent9f3cce2bfb3f98150a3ef5a2e4cfe2d4d3f3ae9b (diff)
downloadupstream-b115fcaa8650b451e8e7f9c1c913be2652cfd10f.tar.gz
upstream-b115fcaa8650b451e8e7f9c1c913be2652cfd10f.tar.bz2
upstream-b115fcaa8650b451e8e7f9c1c913be2652cfd10f.zip
mac80211: fix management frame protection issue with mt76 (and possibly other drivers)
Software crypto wasn't working for management frames because the flag indicating management frame crypto was missing Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/395-mac80211-fix-setting-IEEE80211_KEY_FLAG_RX_MGMT-for-.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/395-mac80211-fix-setting-IEEE80211_KEY_FLAG_RX_MGMT-for-.patch b/package/kernel/mac80211/patches/395-mac80211-fix-setting-IEEE80211_KEY_FLAG_RX_MGMT-for-.patch
new file mode 100644
index 0000000000..a42668d069
--- /dev/null
+++ b/package/kernel/mac80211/patches/395-mac80211-fix-setting-IEEE80211_KEY_FLAG_RX_MGMT-for-.patch
@@ -0,0 +1,25 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Sat, 29 Sep 2018 15:55:44 +0200
+Subject: [PATCH] mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode
+ keys
+
+key->sta is only valid after ieee80211_key_link, which is called later
+in this function. Because of that, the IEEE80211_KEY_FLAG_RX_MGMT is
+never set when management frame protection is enabled.
+
+Fixes: e548c49e6dc6b ("mac80211: add key flag for management keys")
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -426,7 +426,7 @@ static int ieee80211_add_key(struct wiph
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_AP_VLAN:
+ /* Keys without a station are used for TX only */
+- if (key->sta && test_sta_flag(key->sta, WLAN_STA_MFP))
++ if (sta && test_sta_flag(sta, WLAN_STA_MFP))
+ key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT;
+ break;
+ case NL80211_IFTYPE_ADHOC: