From: Jouni Malinen Date: Wed, 23 Feb 2022 22:07:07 +0000 (+0200) Subject: DPP: Clear SCANNING state when starting network introduction X-Git-Tag: hostap_2_11~2214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=414ca953f14d5fc2dadace578f684a2c9a272e92;p=thirdparty%2Fhostap.git DPP: Clear SCANNING state when starting network introduction This is needed to avoid leaving wpa_state to SCANNING if network introduction fails and a new association is not started. This was found with the following test case sequence: dpp_conn_status_connector_mismatch scan_trigger_failure Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 7bbc43521..20a111c89 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -3472,6 +3472,8 @@ int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, wpa_printf(MSG_DEBUG, "DPP: Starting network introduction protocol to derive PMKSA for " MACSTR, MAC2STR(bss->bssid)); + if (wpa_s->wpa_state == WPA_SCANNING) + wpa_supplicant_set_state(wpa_s, wpa_s->scan_prev_wpa_state); len = 5 + 4 + os_strlen(ssid->dpp_connector); #ifdef CONFIG_DPP2