mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
eapol: emit HANDSHAKE_EVENT_REKEY_FAILED
If we receive handshake message 1/4 after we are already connected the AP is attempting to rekey. This may not be allowed and if not we do not process the rekey and emit HANDSHAKE_EVENT_REKEY_FAILED so any listeners can handle accordingly.
This commit is contained in:
parent
a76376cac4
commit
8edaa23f8a
10
src/eapol.c
10
src/eapol.c
@ -1104,6 +1104,16 @@ static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm,
|
|||||||
memcmp(sm->handshake->anonce,
|
memcmp(sm->handshake->anonce,
|
||||||
ek->key_nonce, sizeof(ek->key_nonce)) ||
|
ek->key_nonce, sizeof(ek->key_nonce)) ||
|
||||||
sm->handshake->ptk_complete) {
|
sm->handshake->ptk_complete) {
|
||||||
|
if (sm->handshake->ptk_complete && sm->handshake->no_rekey) {
|
||||||
|
/*
|
||||||
|
* In case of rekey not being allowed, signal to upper
|
||||||
|
* layers that we need to do a full reauth
|
||||||
|
*/
|
||||||
|
handshake_event(sm->handshake,
|
||||||
|
HANDSHAKE_EVENT_REKEY_FAILED, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
handshake_state_new_snonce(sm->handshake);
|
handshake_state_new_snonce(sm->handshake);
|
||||||
handshake_state_set_anonce(sm->handshake, ek->key_nonce);
|
handshake_state_set_anonce(sm->handshake, ek->key_nonce);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user