Fix references to correct driver capability flag for PSK/OWE offloads

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: d984c7b298 ("hostapd: Add support for OWE offload for STA/AP interface")
Fixes: da364180fb ("hostapd: Support 4-way handshake offload for AP/P2P GO")
Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com>
This commit is contained in:
Vinayak Yadawad 2023-11-22 14:49:52 +05:30 committed by Jouni Malinen
parent 1bd5e35b87
commit 73b49016f2
4 changed files with 4 additions and 4 deletions

View file

@ -775,7 +775,7 @@ skip_wpa_check:
#ifdef CONFIG_OWE #ifdef CONFIG_OWE
if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_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 && wpa_auth_sta_key_mgmt(sta->wpa_sm) == WPA_KEY_MGMT_OWE &&
elems.owe_dh) { elems.owe_dh) {
u8 *npos; u8 *npos;

View file

@ -5111,7 +5111,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
goto fail; goto fail;
if ((params->key_mgmt_suites & WPA_KEY_MGMT_PSK) && 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 && params->psk_len &&
nla_put(msg, NL80211_ATTR_PMK, params->psk_len, params->psk)) nla_put(msg, NL80211_ATTR_PMK, params->psk_len, params->psk))
goto fail; goto fail;

View file

@ -3376,7 +3376,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_OWE #ifdef CONFIG_OWE
if (wpa_s->key_mgmt == WPA_KEY_MGMT_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 || (!bssid_known ||
owe_process_assoc_resp(wpa_s->wpa, owe_process_assoc_resp(wpa_s->wpa,
wpa_s->valid_links ? wpa_s->valid_links ?

View file

@ -3617,7 +3617,7 @@ static u8 * wpas_populate_assoc_ies(
#endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_TESTING_OPTIONS */
if (algs == WPA_AUTH_ALG_OPEN && if (algs == WPA_AUTH_ALG_OPEN &&
ssid->key_mgmt == WPA_KEY_MGMT_OWE && 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; struct wpabuf *owe_ie;
u16 group; u16 group;