]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Improve PSK mismatch detection
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 26 Jun 2025 08:57:50 +0000 (10:57 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 2 Oct 2025 20:47:19 +0000 (23:47 +0300)
As the comment in wpa_supplicant_event_disassoc_finish() says,
mac80211-based drivers use the WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY
reason code in locally generated disconnection events for cases where
the AP does not reply anymore. This case does not indicate that the PSK
is wrong.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
wpa_supplicant/events.c

index 883f0e7c858c7010fcea3926204414867a36c39a..42a52899d881b32301818512ce679c75f624d74e 100644 (file)
@@ -4669,6 +4669,8 @@ static int could_be_psk_mismatch(struct wpa_supplicant *wpa_s, u16 reason_code,
        if (locally_generated) {
                if (reason_code == WLAN_REASON_IE_IN_4WAY_DIFFERS)
                        return 0;
+               if (reason_code == WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY)
+                       return 0;
        }
 
        return 1;