[PATCH] EAP: Remove unreachable code in EAP auth SM

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Apr 3 05:16:12 PDT 2019


From: Ilan Peer <ilan.peer at intel.com>

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/ap/wpa_auth.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index 616b20592c..03806eb093 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -3302,16 +3302,9 @@ SM_STATE(WPA_PTK, PTKINITDONE)
 		}
 	}
 
-	if (0 /* IBSS == TRUE */) {
-		sm->keycount++;
-		if (sm->keycount == 2) {
-			wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
-					   WPA_EAPOL_portValid, 1);
-		}
-	} else {
-		wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid,
-				   1);
-	}
+	wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid,
+			   1);
+
 	wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyAvailable, 0);
 	wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyDone, 1);
 	if (sm->wpa == WPA_VERSION_WPA)
-- 
2.19.1




More information about the Hostap mailing list