blob: b7753e8768021548c5001def6fe7f5a915d1ffb4 [file] [log] [blame]
From 1d4221d2dd26e3324617c390ccb117f59b894dde Mon Sep 17 00:00:00 2001
From: mtk25255 <rohit.kamat@mediatek.com>
Date: Thu, 12 Oct 2023 14:29:23 +0800
Subject: [PATCH 048/126] mtk: hostapd: Fix RSNXE Interop issue with STA
---
src/ap/ieee802_11.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index ee698fa4a..4581ae1d4 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -5370,6 +5370,7 @@ static void handle_assoc(struct hostapd_data *hapd,
int omit_rsnxe = 0;
bool set_beacon = false;
bool mld_addrs_not_translated = false;
+ bool sae_pk = false;
if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
sizeof(mgmt->u.assoc_req))) {
@@ -5615,7 +5616,17 @@ static void handle_assoc(struct hostapd_data *hapd,
if (resp != WLAN_STATUS_SUCCESS)
goto fail;
omit_rsnxe = !get_ie(pos, left, WLAN_EID_RSNX);
-
+#ifdef CONFIG_SAE_PK
+ sae_pk = hostapd_sae_pk_in_use(hapd->conf);
+#endif /* CONFIG_SAE_PK */
+ if (omit_rsnxe) {
+ if (!reassoc && wpa_key_mgmt_sae(hapd->conf->wpa_key_mgmt) &&
+ (hapd->conf->sae_pwe == SAE_PWE_HASH_TO_ELEMENT ||
+ hapd->conf->sae_pwe == SAE_PWE_BOTH || sae_pk ||
+ wpa_key_mgmt_sae_ext_key(hapd->conf->wpa_key_mgmt))) {
+ omit_rsnxe = 0;
+ }
+ }
if (hostapd_get_aid(hapd, sta) < 0) {
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "No room for more AIDs");
--
2.18.0