]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Clear SCANNING state when starting network introduction
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 23 Feb 2022 22:07:07 +0000 (00:07 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 23 Feb 2022 22:23:25 +0000 (00:23 +0200)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/dpp_supplicant.c

index 7bbc435215295a4f6bc2f581ec4f75d38b281464..20a111c89962cb74e253bcd991bd611e4e884281 100644 (file)
@@ -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