developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From 1d4221d2dd26e3324617c390ccb117f59b894dde Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: mtk25255 <rohit.kamat@mediatek.com> |
| 3 | Date: Thu, 12 Oct 2023 14:29:23 +0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 4 | Subject: [PATCH 048/126] mtk: hostapd: Fix RSNXE Interop issue with STA |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | src/ap/ieee802_11.c | 13 ++++++++++++- |
| 8 | 1 file changed, 12 insertions(+), 1 deletion(-) |
| 9 | |
| 10 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 11 | index ee698fa4a..4581ae1d4 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 12 | --- a/src/ap/ieee802_11.c |
| 13 | +++ b/src/ap/ieee802_11.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 14 | @@ -5370,6 +5370,7 @@ static void handle_assoc(struct hostapd_data *hapd, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 15 | int omit_rsnxe = 0; |
| 16 | bool set_beacon = false; |
| 17 | bool mld_addrs_not_translated = false; |
| 18 | + bool sae_pk = false; |
| 19 | |
| 20 | if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) : |
| 21 | sizeof(mgmt->u.assoc_req))) { |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 22 | @@ -5615,7 +5616,17 @@ static void handle_assoc(struct hostapd_data *hapd, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | -- |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 42 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 43 | |