diff mbox series

[4/8] mac80211: Allow user space to register for station Rx authentication

Message ID 20190830112451.21655-5-luca@coelho.fi (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show
Series cfg80211/mac80211 patches from our internal tree 2019-08-30 | expand

Commit Message

Luca Coelho Aug. 30, 2019, 11:24 a.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

To support Pre Association Security Negotiation (PASN) while already
associated to one AP, allow user space to register to Rx authentication
frames, so that the user space logic would be able to receive/handle
authentication frames from a different AP as part of PASN.

Note that it is expected that user space would intelligently register
for Rx authentication frames, i.e., only when PASN is used and configure
a match filter only for PASN authentication algorithm, as otherwise
the MLME functionality of mac80211 would be broken.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/main.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Johannes Berg Sept. 11, 2019, 8:27 a.m. UTC | #1
On Fri, 2019-08-30 at 14:24 +0300, Luca Coelho wrote:
> From: Ilan Peer <ilan.peer@intel.com>
> 
> To support Pre Association Security Negotiation (PASN) while already
> associated to one AP, allow user space to register to Rx authentication
> frames, so that the user space logic would be able to receive/handle
> authentication frames from a different AP as part of PASN.
> 
> Note that it is expected that user space would intelligently register
> for Rx authentication frames, i.e., only when PASN is used and configure
> a match filter only for PASN authentication algorithm, as otherwise
> the MLME functionality of mac80211 would be broken.

This literally broke hundreds of wpa_s tests, so I guess it's not
"intelligently register[ing]" for them...

johannes
diff mbox series

Patch

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 29b9d57df1a3..6eddc5592fc4 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -416,7 +416,20 @@  ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
 	},
 	[NL80211_IFTYPE_STATION] = {
 		.tx = 0xffff,
+		/*
+		 * To support Pre Association Security Negotiation (PASN) while
+		 * already associated to one AP, allow user space to register to
+		 * Rx authentication frames, so that the user space logic would
+		 * be able to receive/handle authentication frames from a
+		 * different AP as part of PASN.
+		 * It is expected that user space would intelligently register
+		 * for Rx authentication frames, i.e., only when PASN is used
+		 * and configure a match filter only for PASN authentication
+		 * algorithm, as otherwise the MLME functionality of mac80211
+		 * would be broken.
+		 */
 		.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+			BIT(IEEE80211_STYPE_AUTH >> 4) |
 			BIT(IEEE80211_STYPE_PROBE_REQ >> 4),
 	},
 	[NL80211_IFTYPE_AP] = {