From 2fd755c285da51ee6167426c524c1de0de381b9b Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 25 Apr 2019 12:52:52 -0700 Subject: [PATCH] eapol: update eapol_key_handle to work with FILS rekeys Since FILS does not use a MIC, the 1/4 handler would always get called for FILS PTK rekeys. We can use the fact that message 1/4 has no MIC as well as no encrypted data to determine which packet it is. Both no MIC and no encrypted data means its message 1/4. Anything else is 3/4. --- src/eapol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eapol.c b/src/eapol.c index 90d0d4bf..f07abcc9 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -1956,7 +1956,7 @@ static void eapol_key_handle(struct eapol_sm *sm, } /* If no MIC, then assume packet 1, otherwise packet 3 */ - if (!ek->key_mic) + if (!ek->key_mic && !ek->encrypted_key_data) eapol_handle_ptk_1_of_4(sm, ek); else { if (!key_data_len)