From dbe485a35af87d416ef2c3665b1ad2b68aa49d98 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Mon, 10 Aug 2020 01:01:28 +0530 Subject: [PATCH] SAE-PK: Check psk param also to look for SAE-PK acceptable BSS SAE-PK password can be set using psk parameter also in case of mixed SAE+PSK networks, so look for acceptable SAE-PK BSS when SAE password not set and psk parameter meets SAE-PK password criteria. Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/events.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 0fcb1762e..f19165373 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1440,7 +1440,10 @@ skip_assoc_disallow: #ifdef CONFIG_SAE_PK if (ssid->sae_pk == SAE_PK_MODE_AUTOMATIC && wpa_key_mgmt_sae(ssid->key_mgmt) && - ssid->sae_password && sae_pk_valid_password(ssid->sae_password) && + ((ssid->sae_password && + sae_pk_valid_password(ssid->sae_password)) || + (!ssid->sae_password && ssid->passphrase && + sae_pk_valid_password(ssid->passphrase))) && !(rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_PK)) && sae_pk_acceptable_bss_with_pk(wpa_s, bss, ssid, match_ssid, match_ssid_len)) {