]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RSNO: Allow OWE to be configured in RSN overrides in AP processing
authorSai Pratyusha Magam <smagam@qti.qualcomm.com>
Sat, 2 Aug 2025 16:42:56 +0000 (22:12 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 15 Aug 2025 20:38:57 +0000 (23:38 +0300)
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 <smagam@qti.qualcomm.com>
src/ap/ieee802_11.c
src/ap/wpa_auth_glue.c

index a1d45db2f562a891efc364ede7f17a693b579438..5557b46cec3760609e4ade60937c5be0c3b9671a 100644 (file)
@@ -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)) {
index 519948a518c2c57c04162173c7118502eb8d52ba..144e88e795d764d038af4b6ec6ca75274b8a18a8 100644 (file)
@@ -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);