From 90856b19507f9ad0b4046604c490defc8c7ffd61 Mon Sep 17 00:00:00 2001 From: Chenming Huang Date: Thu, 23 Jan 2025 07:37:39 +0530 Subject: [PATCH] DPP: Send connection status result if disconnected during 4-way HS Connection status result was reported during failed 4-way handshake if that failure might have been due to an incorrect phassphrase/password. 4-eay handshake might fail for other reasons and if that is the case, the connection status result is delayed unnecessarily long untile the 15 second timeout occurs. Optimize this by sending out the connection status result in all disconnection cases that happen before the 4-way handshake has been completed successfully. Signed-off-by: Chenming Huang --- wpa_supplicant/events.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index cf8f0667c..ec29deae1 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -4718,10 +4718,6 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s, return; /* P2P group removed */ wpas_auth_failed(wpa_s, "WRONG_KEY", wpa_s->pending_bssid); wpas_notify_psk_mismatch(wpa_s); -#ifdef CONFIG_DPP2 - wpas_dpp_send_conn_status_result(wpa_s, - DPP_STATUS_AUTH_FAILURE); -#endif /* CONFIG_DPP2 */ } if (!wpa_s->disconnected && (!wpa_s->auto_reconnect_disabled || @@ -4776,6 +4772,9 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s, else wpa_s->disconnect_reason = reason_code; wpas_notify_disconnect_reason(wpa_s); +#ifdef CONFIG_DPP2 + wpas_dpp_send_conn_status_result(wpa_s, DPP_STATUS_AUTH_FAILURE); +#endif /* CONFIG_DPP2 */ if (wpa_supplicant_dynamic_keys(wpa_s)) { wpa_dbg(wpa_s, MSG_DEBUG, "Disconnect event - remove keys"); wpa_clear_keys(wpa_s, wpa_s->bssid); -- 2.47.3