From d02c038a0de8f87392ca25c8524eecec107ab0be Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 3 May 2019 11:59:50 -0700 Subject: [PATCH] eapol: allow FILS to use eapol_start A new eapol API was added specifically for FILS (eapol_set_started). Since either way is special cased for FILS, its a bit cleaner to just check the AKM inside eapol_start and, if FILS, dont start any timeouts or start the handshake (effectively what eapol_set_started was doing). --- src/eapol.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/eapol.c b/src/eapol.c index c693a672..3748c4cb 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -2352,6 +2352,14 @@ bool eapol_start(struct eapol_sm *sm) sm->started = true; + /* + * FILS only uses the 4-way for rekeys, so only started needs to be set, + * then we wait for a rekey. + */ + if (sm->handshake->akm_suite & (IE_RSN_AKM_SUITE_FILS_SHA256 | + IE_RSN_AKM_SUITE_FILS_SHA384)) + return true; + if (sm->require_handshake) sm->timeout = l_timeout_create(eapol_4way_handshake_time, eapol_timeout, sm, NULL);