From 438a27b369b9a96e27f510f2ce31931cc580be30 Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Tue, 4 Jun 2024 22:21:02 -0700 Subject: [PATCH] Do not derive SAE PT if the network profile does not include SAE wpa_s_setup_sae_pt() derived SAE PT even when the configured key management options did not include SAE if the global sae_pwe configuration parameter had been changed to enable H2E. This adds unnecessary extra delay, so derive PT only if SAE is actually enabled in the network profile. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 6df13739b..3689f203d 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2424,6 +2424,7 @@ void wpa_s_setup_sae_pt(struct wpa_config *conf, struct wpa_ssid *ssid, password = ssid->passphrase; if (!password || + !wpa_key_mgmt_sae(ssid->key_mgmt) || (conf->sae_pwe == SAE_PWE_HUNT_AND_PECK && !ssid->sae_password_id && !wpa_key_mgmt_sae_ext_key(ssid->key_mgmt) && !force &&