[PATCH] Revert "EAPOL auth: Disconnect after IEEE 802.1X failure"

David Fries David
Sat Oct 13 18:42:08 PDT 2012


This reverts commit fd8e4fda506f32efadebdf62aaf51769a4d08fdc.
Committer: Jouni Malinen <j at w1.fi> 

Conflicts:
	src/ap/ieee802_1x.c
debug message format has changed
---
 src/ap/ieee802_1x.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index e87431e..0314417 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -2206,16 +2206,12 @@ static void ieee802_1x_finished(struct hostapd_data *hapd,
 			       "Added PMKSA cache entry (IEEE 802.1X)");
 	}
 
-	if (!success) {
+#ifdef CONFIG_WPS
+	if (!success && (sta->flags & WLAN_STA_WPS)) {
 		/*
 		 * Many devices require deauthentication after WPS provisioning
 		 * and some may not be be able to do that themselves, so
-		 * disconnect the client here. In addition, this may also
-		 * benefit IEEE 802.1X/EAPOL authentication cases, too since
-		 * the EAPOL PAE state machine would remain in HELD state for
-		 * considerable amount of time and some EAP methods, like
-		 * EAP-FAST with anonymous provisioning, may require another
-		 * EAPOL authentication to be started to complete connection.
+		 * disconnect the client here.
 		 */
 		wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "IEEE 802.1X: Force "
 			"disconnection after EAP-Failure");
@@ -2225,6 +2221,7 @@ static void ieee802_1x_finished(struct hostapd_data *hapd,
 		 */
 		os_sleep(0, 10000);
 		ap_sta_disconnect(hapd, sta, sta->addr,
-				  WLAN_REASON_IEEE_802_1X_AUTH_FAILED);
+				  WLAN_REASON_PREV_AUTH_NOT_VALID);
 	}
+#endif /* CONFIG_WPS */
 }
-- 
1.7.10.4

Please Cc: me on replies.

-- 
David Fries <david at fries.net>    PGP pub CB1EE8F0
http://fries.net/~david/



More information about the Hostap mailing list