diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 1586a5af5..c7187e43d 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -332,6 +332,7 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) wpa_s->sme.auth_alg == data->auth.auth_type || wpa_s->current_ssid->auth_alg == WPA_AUTH_ALG_LEAP) { wpas_connection_failed(wpa_s, wpa_s->pending_bssid); + wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); return; } @@ -448,6 +449,7 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, wpa_msg(wpa_s, MSG_INFO, "SME: Association request to the " "driver failed"); wpas_connection_failed(wpa_s, wpa_s->pending_bssid); + wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); os_memset(wpa_s->pending_bssid, 0, ETH_ALEN); return; } diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 803a51291..fa1423921 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1440,6 +1440,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, * succeed. */ wpas_connection_failed(wpa_s, wpa_s->pending_bssid); + wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); os_memset(wpa_s->pending_bssid, 0, ETH_ALEN); return; }