[PATCH 2/2] dbus: emit the PskMismatch signal also for SAE
Beniamino Galvani
bgalvani at redhat.com
Thu Jun 26 01:57:51 PDT 2025
Commit a678a510fb20 ("dbus: Add D-Bus signal for PSK mismatch
heuristics") introduced the "PskMismatch" signal. D-Bus clients can
use this signal to detect a wrong WPA-PSK password and prompt the user
for a new one.
This commit adds the same functionality to SAE authentication,
emitting the signal when a failure occurs that is likely caused by a
wrong password.
Signed-off-by: Beniamino Galvani <bgalvani at redhat.com>
---
wpa_supplicant/sme.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 47c965bfd..b7c916d08 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -2056,6 +2056,9 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data)
data->auth.ies_len, 0, data->auth.peer,
&ie_offset);
if (res < 0) {
+ if (res == -2)
+ wpas_notify_psk_mismatch(wpa_s);
+
wpas_connection_failed(wpa_s, wpa_s->pending_bssid,
NULL);
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
--
2.49.0
More information about the Hostap
mailing list