mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
eapol: Add eapol_start_preauthentication
Add a wrapper for eapol_start that sets the sm->preauth flag and sends the EAPOL-Start frame immediately to skip the timeout since we know that the supplicant has to initiate the authentication.
This commit is contained in:
parent
f340ea510c
commit
4e9ed2d686
16
src/eapol.c
16
src/eapol.c
@ -728,6 +728,7 @@ struct eapol_sm {
|
||||
bool have_replay:1;
|
||||
bool started:1;
|
||||
bool use_eapol_start:1;
|
||||
bool preauth:1;
|
||||
struct eap_state *eap;
|
||||
struct eapol_buffer *early_frame;
|
||||
};
|
||||
@ -1677,6 +1678,21 @@ eap_error:
|
||||
(int) sm->handshake->ifindex);
|
||||
}
|
||||
|
||||
void eapol_start_preauthentication(struct eapol_sm *sm)
|
||||
{
|
||||
/*
|
||||
* The only difference here is that we send the EAPOL-Start immeditely
|
||||
* instead of in a timeout, and we set sm->preauth so that pae_write
|
||||
* uses the preauthentication protocol id.
|
||||
*/
|
||||
|
||||
sm->use_eapol_start = false;
|
||||
sm->preauth = true;
|
||||
|
||||
eapol_start(sm);
|
||||
send_eapol_start(NULL, sm);
|
||||
}
|
||||
|
||||
bool eapol_init()
|
||||
{
|
||||
state_machines = l_queue_new();
|
||||
|
@ -182,6 +182,7 @@ void eapol_sm_set_event_func(struct eapol_sm *sm, eapol_sm_event_func_t func);
|
||||
|
||||
void eapol_register(struct eapol_sm *sm);
|
||||
void eapol_start(struct eapol_sm *sm);
|
||||
void eapol_start_preauthentication(struct eapol_sm *sm);
|
||||
|
||||
void eapol_pae_open();
|
||||
void eapol_pae_close();
|
||||
|
Loading…
Reference in New Issue
Block a user