blob: aae23591be9c5f0daa3c7e453a9a0c64a5632c3e [file] [log] [blame]
developerd243af02023-12-21 14:49:33 +08001From c21e12bb63b9c3906143ffb368297e3b6a155eb3 Mon Sep 17 00:00:00 2001
2From: mtk25255 <rohit.kamat@mediatek.com>
3Date: Thu, 12 Oct 2023 14:29:23 +0800
4Subject: [PATCH 43/54] mtk: hostapd: Fix RSNXE Interop issue with STA
5
6---
7 src/ap/ieee802_11.c | 13 ++++++++++++-
8 1 file changed, 12 insertions(+), 1 deletion(-)
9
10diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
11index d46c5a42b..1db66a783 100644
12--- a/src/ap/ieee802_11.c
13+++ b/src/ap/ieee802_11.c
14@@ -5181,6 +5181,7 @@ static void handle_assoc(struct hostapd_data *hapd,
15 int delay_assoc = 0;
16 #endif /* CONFIG_FILS */
17 int omit_rsnxe = 0;
18+ bool sae_pk = false;
19
20 if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
21 sizeof(mgmt->u.assoc_req))) {
22@@ -5399,7 +5400,17 @@ static void handle_assoc(struct hostapd_data *hapd,
23 if (resp != WLAN_STATUS_SUCCESS)
24 goto fail;
25 omit_rsnxe = !get_ie(pos, left, WLAN_EID_RSNX);
26-
27+#ifdef CONFIG_SAE_PK
28+ sae_pk = hostapd_sae_pk_in_use(hapd->conf);
29+#endif /* CONFIG_SAE_PK */
30+ if (omit_rsnxe) {
31+ if (!reassoc && wpa_key_mgmt_sae(hapd->conf->wpa_key_mgmt) &&
32+ (hapd->conf->sae_pwe == SAE_PWE_HASH_TO_ELEMENT ||
33+ hapd->conf->sae_pwe == SAE_PWE_BOTH || sae_pk ||
34+ wpa_key_mgmt_sae_ext_key(hapd->conf->wpa_key_mgmt))) {
35+ omit_rsnxe = 0;
36+ }
37+ }
38 if (hostapd_get_aid(hapd, sta) < 0) {
39 hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
40 HOSTAPD_LEVEL_INFO, "No room for more AIDs");
41--
422.18.0
43