]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Report RSNXE mismatch in EAPOL-Key msg 3/4 more consistently with RSNE
authorJouni Malinen <j@w1.fi>
Sat, 7 Mar 2020 15:05:01 +0000 (17:05 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Mar 2020 15:05:01 +0000 (17:05 +0200)
Use the same reason code to indicate that IE different in 4-way
handshake and also print a hexdump of RSNXE in both Beacon/ProbeResp and
EAPOL-Key msg 3/4 in the log.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/rsn_supp/wpa.c

index 548da45f6d6f320154ea4e142dba7c61167dd0e4..39bc13d716295821fed06340dbbbcc540a782e7e 100644 (file)
@@ -1472,6 +1472,11 @@ static int wpa_supplicant_validate_ie(struct wpa_sm *sm,
              os_memcmp(sm->ap_rsnxe, ie->rsnxe, sm->ap_rsnxe_len) != 0))) {
                wpa_msg(sm->ctx->msg_ctx, MSG_INFO,
                        "WPA: RSNXE mismatch between Beacon/ProbeResp and EAPOL-Key msg 3/4");
+               wpa_hexdump(MSG_INFO, "RSNXE in Beacon/ProbeResp",
+                           sm->ap_rsnxe, sm->ap_rsnxe_len);
+               wpa_hexdump(MSG_INFO, "RSNXE in EAPOL-Key msg 3/4",
+                           ie->rsnxe, ie->rsnxe_len);
+               wpa_sm_deauthenticate(sm, WLAN_REASON_IE_IN_4WAY_DIFFERS);
                return -1;
        }