From 0930209dc2ea73734874954ec891d5ebc159b406 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 2 Oct 2008 17:27:24 +0300 Subject: [PATCH] Register a quick auth timeout if EAPOL fails to avoid long waits This may be needed if the AP does not disconnect in case of EAP-FAST unauthenticated provisioning (EAP-Failure). Adding the local short timeout will speed up the process in such a case by reducing the wait (which can often be up to 60 seconds). --- wpa_supplicant/wpas_glue.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c index 7a74189..f0c1cda 100644 --- a/wpa_supplicant/wpas_glue.c +++ b/wpa_supplicant/wpas_glue.c @@ -228,6 +228,15 @@ static void wpa_supplicant_eapol_cb(struct eapol_sm *eapol, int success, wpa_printf(MSG_DEBUG, "EAPOL authentication completed %ssuccessfully", success ? "" : "un"); + if (!success) { + /* + * Make sure we do not get stuck here waiting for long EAPOL + * timeout if the AP does not disconnect in case of + * authentication failure. + */ + wpa_supplicant_req_auth_timeout(wpa_s, 2, 0); + } + if (!success || !wpa_s->driver_4way_handshake) return; -- 2.1.4