]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Fix processing of Authentication timeout and failure
authorEyal Shapira <eyal@wizery.com>
Sun, 29 Jan 2012 15:44:31 +0000 (17:44 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Jan 2012 15:44:31 +0000 (17:44 +0200)
current_bss and pending_bssid weren't cleaned up so BSS
kept appearing in the scan results even when it was actually gone.
Use wpa_supplicant_mark_disassoc() to cleanup the wpa_s context
instead of just dropping wpa_state back to DISCONNECTED.

Reported-by: Vishal Mahaveer <vishalm@ti.com>
Signed-hostap: Eyal Shapira <eyal@wizery.com>

wpa_supplicant/sme.c

index c5e47d18063c8bf5ed3f287e248df7d860bb79a9..fc283477b715351c2589eb1d04d76cc05f1e45be 100644 (file)
@@ -265,8 +265,8 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
        if (wpa_drv_authenticate(wpa_s, &params) < 0) {
                wpa_msg(wpa_s, MSG_INFO, "SME: Authentication request to the "
                        "driver failed");
-               wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
                wpas_connection_failed(wpa_s, bss->bssid);
+               wpa_supplicant_mark_disassoc(wpa_s);
                return;
        }
 
@@ -503,8 +503,8 @@ void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
                              union wpa_event_data *data)
 {
        wpa_dbg(wpa_s, MSG_DEBUG, "SME: Authentication timed out");
-       wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
        wpas_connection_failed(wpa_s, wpa_s->pending_bssid);
+       wpa_supplicant_mark_disassoc(wpa_s);
 }