[PATCH] no PMKSA entry found, trigger full EAP authentication

Chaojie Xu (许超杰) chaojiex at gmail.com
Mon Dec 5 02:51:16 PST 2016


From: Chaojie Xu <chaojie.xu at spreadtrum.com>

Signed-off-by: chaojie.xu <chaojie.xu at spreadtrum.com>
---
 src/rsn_supp/wpa.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 65e257a..963b31a 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -370,22 +370,13 @@ static int wpa_supplicant_get_pmk(struct wpa_sm *sm,
 	    !wpa_key_mgmt_ft(sm->key_mgmt) && sm->key_mgmt != WPA_KEY_MGMT_OSEN)
 	{
 		/* Send EAPOL-Start to trigger full EAP authentication. */
-		u8 *buf;
-		size_t buflen;
-
 		wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
 			"RSN: no PMKSA entry found - trigger "
 			"full EAP authentication");
-		buf = wpa_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAPOL_START,
-					 NULL, 0, &buflen, NULL);
-		if (buf) {
-			wpa_sm_ether_send(sm, sm->bssid, ETH_P_EAPOL,
-					  buf, buflen);
-			os_free(buf);
-			return -2;
-		}
-
-		return -1;
+		eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
+		eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
+		eapol_sm_notify_portEnabled(wpa_s->eapol, TRUE);
+		return -2;
 	}
 
 	return 0;
-- 
1.9.1




More information about the Hostap mailing list