From 51b437bbfedb7e217e5f48025511749a0f751917 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 15 Jul 2021 17:08:58 -0500 Subject: [PATCH] eapol: Add support for Transition Disable If this indication is received in message 3/4, forward the contents as a HANDSHAKE_EVENT_TRANSITION_DISABLE --- src/eapol.c | 11 +++++++++++ src/handshake.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/eapol.c b/src/eapol.c index 738e801e..2722bc42 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -1607,6 +1607,8 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm, size_t igtk_len; const uint8_t *rsne; const uint8_t *optional_rsne = NULL; + const uint8_t *transition_disable; + size_t transition_disable_len; uint8_t gtk_key_index; uint16_t igtk_key_index; @@ -1815,6 +1817,15 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm, l_debug("Authenticator ignored our IP Address Request"); } + transition_disable = + handshake_util_find_kde(HANDSHAKE_KDE_TRANSITION_DISABLE, + decrypted_key_data, + decrypted_key_data_size, + &transition_disable_len); + if (transition_disable) + handshake_event(hs, HANDSHAKE_EVENT_TRANSITION_DISABLE, + transition_disable, transition_disable_len); + retransmit: /* * 802.11-2016, Section 12.7.6.4: diff --git a/src/handshake.h b/src/handshake.h index 6ceaeccf..2d51da7c 100644 --- a/src/handshake.h +++ b/src/handshake.h @@ -44,6 +44,8 @@ enum handshake_kde { /* Wi-Fi P2P Technical Specification v1.7 4.2.8 */ HANDSHAKE_KDE_IP_ADDRESS_REQ = 0x506f9a04, HANDSHAKE_KDE_IP_ADDRESS_ALLOC = 0x506f9a05, + /* Wi-Fi WPA3 Specification v3.0 Table 4 */ + HANDSHAKE_KDE_TRANSITION_DISABLE = 0x506f9a20, }; enum handshake_event {