3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 03:32:42 +01:00

eapol: Generate new snonce on new 4-Way Handshake

Make sure that we handle PTK rekeying.
This commit is contained in:
Andrew Zaborowski 2015-05-06 01:48:37 +02:00 committed by Denis Kenzior
parent 1d0afbc44c
commit 0ea28ba5ad

View File

@ -664,16 +664,14 @@ static void eapol_handle_ptk_1_of_4(uint32_t ifindex, struct eapol_sm *sm,
return;
}
if (!sm->have_snonce) {
if (!get_nonce(sm->snonce)) {
handshake_failed(ifindex, sm,
MPDU_REASON_CODE_UNSPECIFIED);
return;
}
sm->have_snonce = true;
if (!get_nonce(sm->snonce)) {
handshake_failed(ifindex, sm, MPDU_REASON_CODE_UNSPECIFIED);
return;
}
sm->have_snonce = true;
sm->ptk_complete = false;
memcpy(sm->anonce, ek->key_nonce, sizeof(ek->key_nonce));
crypto_derive_pairwise_ptk(sm->pmk, sm->spa, sm->aa,