]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Do not try to detect PSK mismatch during PTK rekeying
authorAlexander Wetzel <alexander@wetzel-home.de>
Fri, 20 Dec 2019 19:21:26 +0000 (20:21 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 21 Dec 2019 15:10:17 +0000 (17:10 +0200)
When a PTK rekey fails it can't be caused by a PSK mismatch. Report a
possible PSK mismatch only during the initial 4-way handshake to avoid
incorrect reports.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
wpa_supplicant/events.c

index 852f41e40d2030c6a232131fdf0d94c3192296cd..9d808c55dbc96701557785277c728708377a0bfe 100644 (file)
@@ -3071,9 +3071,10 @@ static int could_be_psk_mismatch(struct wpa_supplicant *wpa_s, u16 reason_code,
                                 int locally_generated)
 {
        if (wpa_s->wpa_state != WPA_4WAY_HANDSHAKE ||
+           !wpa_s->new_connection ||
            !wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) ||
            wpa_key_mgmt_sae(wpa_s->key_mgmt))
-               return 0; /* Not in 4-way handshake with PSK */
+               return 0; /* Not in initial 4-way handshake with PSK */
 
        /*
         * It looks like connection was lost while trying to go through PSK