diff mbox

no PMKSA entry found, trigger full EAP authentication

Message ID 20161205105116.88756-1-Chaojie.Xu@spreadtrum.com
State Changes Requested
Headers show

Commit Message

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

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

Comments

Jouni Malinen Dec. 5, 2016, 11:36 a.m. UTC | #1
On Mon, Dec 05, 2016 at 06:51:16PM +0800, Chaojie Xu (许超杰) wrote:
> From: Chaojie Xu <chaojie.xu@spreadtrum.com>
> 
> Signed-off-by: chaojie.xu <chaojie.xu@spreadtrum.com>

Could you please provide commit message that describes why this change
is needed? What does this fix? Can you please share a debug log from an
exchange that fails without this change and then another debug log with
this change applied showing correctly behavior?
diff mbox

Patch

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;