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 <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2022-02-24 00:07:07 +02:00 committed by Jouni Malinen
parent 0b5f8e3d8e
commit 414ca953f1

View file

@ -3472,6 +3472,8 @@ int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"DPP: Starting network introduction protocol to derive PMKSA for " "DPP: Starting network introduction protocol to derive PMKSA for "
MACSTR, MAC2STR(bss->bssid)); 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); len = 5 + 4 + os_strlen(ssid->dpp_connector);
#ifdef CONFIG_DPP2 #ifdef CONFIG_DPP2