]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Fix processing of Authentication request failure
authorJouni Malinen <j@w1.fi>
Sun, 4 Dec 2011 19:04:24 +0000 (21:04 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 4 Dec 2011 19:04:24 +0000 (21:04 +0200)
The wpa_state needs to be dropped back to DISCONNECTED to allow scan
results to trigger a new authentication attempt. In addition, we can use
wpas_connection_failed() instead of requesting a scan after a fixed time
to make this error case more consistent with other similar error paths
in sme.c.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/sme.c

index b63f4bbbaf43c2bd558b883e99fb410b8bb3b5cd..8e1d95a946ee3cf77df605a6916530a0651383da 100644 (file)
@@ -265,7 +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_req_scan(wpa_s, 1, 0);
+               wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
+               wpas_connection_failed(wpa_s, bss->bssid);
                return;
        }