]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix references to correct driver capability flag for PSK/OWE offloads
authorVinayak Yadawad <vinayak.yadawad@broadcom.com>
Wed, 22 Nov 2023 09:19:52 +0000 (14:49 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 23 Nov 2023 09:41:18 +0000 (11:41 +0200)
Fix references to the appropriate driver capability drv_flags2. The
initial version used the incorrect drv_flags value and by doing so,
ended up using incorrect driver capabilities (DEAUTH_TX_STATUS,
BSS_SELECT, TDLS_SUPPORT) which could result in incorrect OWE
functionality for both AP and STA cases.

Fixes: d984c7b29801 ("hostapd: Add support for OWE offload for STA/AP interface")
Fixes: da364180fba6 ("hostapd: Support 4-way handshake offload for AP/P2P GO")
Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com>
src/ap/drv_callbacks.c
src/drivers/driver_nl80211.c
wpa_supplicant/events.c
wpa_supplicant/wpa_supplicant.c

index e58cb9f527437ef858f3b08704ba6610a5df521f..7c79f06726df75a67a5b5ec4a45808380921fe05 100644 (file)
@@ -775,7 +775,7 @@ skip_wpa_check:
 
 #ifdef CONFIG_OWE
        if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) &&
-           !(iface->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP) &&
+           !(iface->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_AP) &&
            wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE &&
            elems.owe_dh) {
                u8 *npos;
index ac63e640542d6403c4025e5ea5901cad7a47931f..63b3fa0f00213ae36290d5126d8a824c3dc87963 100644 (file)
@@ -5111,7 +5111,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
                goto fail;
 
        if ((params->key_mgmt_suites & WPA_KEY_MGMT_PSK) &&
-           (drv->capa.flags & WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK) &&
+           (drv->capa.flags2 & WPA_DRIVER_FLAGS2_4WAY_HANDSHAKE_AP_PSK) &&
            params->psk_len &&
            nla_put(msg, NL80211_ATTR_PMK, params->psk_len, params->psk))
                goto fail;
index 0e5b6c6a86d6cc04a6b9afc61e2ba93bfb50e3ad..372d0535e4253a58002be2c35c33c9e072293aaa 100644 (file)
@@ -3376,7 +3376,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
 
 #ifdef CONFIG_OWE
        if (wpa_s->key_mgmt == WPA_KEY_MGMT_OWE &&
-           !(wpa_s->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA) &&
+           !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA) &&
            (!bssid_known ||
             owe_process_assoc_resp(wpa_s->wpa,
                                    wpa_s->valid_links ?
index a292f05da888dfbce599b06bf365148723c5ec9b..38399d6400d05242151b267678135f19f4fe025b 100644 (file)
@@ -3617,7 +3617,7 @@ static u8 * wpas_populate_assoc_ies(
 #endif /* CONFIG_TESTING_OPTIONS */
        if (algs == WPA_AUTH_ALG_OPEN &&
            ssid->key_mgmt == WPA_KEY_MGMT_OWE &&
-           !(wpa_s->drv_flags & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA)) {
+           !(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OWE_OFFLOAD_STA)) {
                struct wpabuf *owe_ie;
                u16 group;