mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
eapol: Remove eapol_sm_set_protocol_version
Handshake state will now pick reasonable defaults
This commit is contained in:
parent
483194ee91
commit
0f6d1ece78
@ -252,7 +252,6 @@ static struct eapol_sm *adhoc_new_sm(struct sta_state *sta, bool authenticator,
|
||||
}
|
||||
|
||||
eapol_sm_set_listen_interval(sm, 100);
|
||||
eapol_sm_set_protocol_version(sm, EAPOL_PROTOCOL_VERSION_2004);
|
||||
|
||||
if (authenticator)
|
||||
sta->hs_auth = hs;
|
||||
|
1
src/ap.c
1
src/ap.c
@ -444,7 +444,6 @@ static void ap_start_rsna(struct sta_state *sta, const uint8_t *gtk_rsc)
|
||||
}
|
||||
|
||||
eapol_sm_set_listen_interval(sta->sm, sta->listen_interval);
|
||||
eapol_sm_set_protocol_version(sta->sm, EAPOL_PROTOCOL_VERSION_2004);
|
||||
|
||||
eapol_register(sta->sm);
|
||||
|
||||
|
20
src/eapol.c
20
src/eapol.c
@ -890,12 +890,6 @@ void eapol_sm_free(struct eapol_sm *sm)
|
||||
eapol_sm_destroy(sm);
|
||||
}
|
||||
|
||||
void eapol_sm_set_protocol_version(struct eapol_sm *sm,
|
||||
enum eapol_protocol_version protocol_version)
|
||||
{
|
||||
sm->protocol_version = protocol_version;
|
||||
}
|
||||
|
||||
void eapol_sm_set_listen_interval(struct eapol_sm *sm, uint16_t interval)
|
||||
{
|
||||
sm->listen_interval = interval;
|
||||
@ -981,10 +975,7 @@ static void send_eapol_start(struct l_timeout *timeout, void *user_data)
|
||||
l_timeout_remove(sm->eapol_start_timeout);
|
||||
sm->eapol_start_timeout = NULL;
|
||||
|
||||
if (!sm->protocol_version)
|
||||
sm->protocol_version = EAPOL_PROTOCOL_VERSION_2001;
|
||||
|
||||
frame->header.protocol_version = sm->protocol_version;
|
||||
frame->header.protocol_version = EAPOL_PROTOCOL_VERSION_2001;
|
||||
frame->header.packet_type = 1;
|
||||
l_put_be16(0, &frame->header.packet_len);
|
||||
|
||||
@ -2339,15 +2330,22 @@ void eapol_register(struct eapol_sm *sm)
|
||||
sm->watch_id = eapol_frame_watch_add(sm->handshake->ifindex,
|
||||
eapol_rx_auth_packet, sm);
|
||||
|
||||
if (!sm->handshake->proto_version)
|
||||
sm->protocol_version = EAPOL_PROTOCOL_VERSION_2004;
|
||||
else
|
||||
sm->protocol_version = sm->handshake->proto_version;
|
||||
|
||||
sm->started = true;
|
||||
/* Since AP/AdHoc only support AKM PSK we can hard code this */
|
||||
sm->mic_len = 16;
|
||||
|
||||
/* kick off handshake */
|
||||
eapol_ptk_1_of_4_retry(NULL, sm);
|
||||
} else
|
||||
} else {
|
||||
sm->watch_id = eapol_frame_watch_add(sm->handshake->ifindex,
|
||||
eapol_rx_packet, sm);
|
||||
sm->protocol_version = sm->handshake->proto_version;
|
||||
}
|
||||
}
|
||||
|
||||
bool eapol_start(struct eapol_sm *sm)
|
||||
|
Loading…
Reference in New Issue
Block a user