From 82eeef1c29e94e335ee0a3f32bf24e65f982a126 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 17 Apr 2019 15:16:38 -0700 Subject: [PATCH] eapol: add eapol_set_started FILS does not require an eapol_sm for authentication, but rekeys are still performed using the 4-way handshake. Because of this FILS needs to create a eapol_sm in a 'started' state, but without calling eapol_start as this will initialize EAP and create handshake timeouts. This allows EAPoL to wait for any 4-way packets, and handle them as rekeys. --- src/eapol.c | 5 +++++ src/eapol.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/eapol.c b/src/eapol.c index 7e0442da..86e2b004 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -2201,6 +2201,11 @@ void __eapol_set_rekey_offload_func(eapol_rekey_offload_func_t func) rekey_offload = func; } +void eapol_set_started(struct eapol_sm *sm) +{ + sm->started = true; +} + void eapol_register(struct eapol_sm *sm) { l_queue_push_head(state_machines, sm); diff --git a/src/eapol.h b/src/eapol.h index 2306048e..e3a9943d 100644 --- a/src/eapol.h +++ b/src/eapol.h @@ -116,6 +116,7 @@ void eapol_sm_set_listen_interval(struct eapol_sm *sm, uint16_t interval); void eapol_sm_set_user_data(struct eapol_sm *sm, void *user_data); void eapol_sm_set_event_func(struct eapol_sm *sm, eapol_sm_event_func_t func); +void eapol_set_started(struct eapol_sm *sm); void eapol_register(struct eapol_sm *sm); bool eapol_start(struct eapol_sm *sm);