From: Sai Pratyusha Magam Date: Sat, 2 Aug 2025 16:42:56 +0000 (+0530) Subject: RSNO: Allow OWE to be configured in RSN overrides in AP processing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40326b60b17a41cb9c1319c006cf5206dace3cee;p=thirdparty%2Fhostap.git RSNO: Allow OWE to be configured in RSN overrides in AP processing An AP can be configured with OWE enabled in RSNOE or RSNO2E, so look up those in addition to the base RSNE for the presence of OWE AKM. Signed-off-by: Sai Pratyusha Magam --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index a1d45db2f..5557b46ce 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -4531,7 +4531,10 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, #endif /* CONFIG_SAE */ #ifdef CONFIG_OWE - if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && + if (((hapd->conf->wpa_key_mgmt | + hapd->conf->rsn_override_key_mgmt | + hapd->conf->rsn_override_key_mgmt_2) & + WPA_KEY_MGMT_OWE) && wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE && elems->owe_dh) { resp = owe_process_assoc_req(hapd, sta, elems->owe_dh, @@ -5264,7 +5267,10 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, #ifdef CONFIG_OWE if (sta && status_code == WLAN_STATUS_SUCCESS && - (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE)) + ((hapd->conf->wpa_key_mgmt | + hapd->conf->rsn_override_key_mgmt | + hapd->conf->rsn_override_key_mgmt_2) & + WPA_KEY_MGMT_OWE)) p = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, p, buf + buflen - p, ies, ies_len); @@ -5353,7 +5359,8 @@ rsnxe_done: #endif /* CONFIG_IEEE80211BE */ #ifdef CONFIG_OWE - if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && + if (((hapd->conf->wpa_key_mgmt | hapd->conf->rsn_override_key_mgmt | + hapd->conf->rsn_override_key_mgmt_2) & WPA_KEY_MGMT_OWE) && sta && sta->owe_ecdh && status_code == WLAN_STATUS_SUCCESS && wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE && !wpa_auth_sta_get_pmksa(sta->wpa_sm)) { diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 519948a51..144e88e79 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -412,13 +412,17 @@ static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr, #endif /* CONFIG_SAE */ #ifdef CONFIG_OWE - if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && + if (((hapd->conf->wpa_key_mgmt | hapd->conf->rsn_override_key_mgmt | + hapd->conf->rsn_override_key_mgmt_2) & + WPA_KEY_MGMT_OWE) && sta && sta->owe_pmk) { if (psk_len) *psk_len = sta->owe_pmk_len; return sta->owe_pmk; } - if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && sta) { + if (((hapd->conf->wpa_key_mgmt | hapd->conf->rsn_override_key_mgmt | + hapd->conf->rsn_override_key_mgmt_2) & + WPA_KEY_MGMT_OWE) && sta) { struct rsn_pmksa_cache_entry *sa; sa = wpa_auth_sta_get_pmksa(sta->wpa_sm);