[PATCH] dbus:Add dbus notify when key_mgmt changes

xinpeng wang wangxinpeng at uniontech.com
Thu Jul 28 01:19:42 PDT 2022


For wpa2/wpa3 authentication mode, wpa_supplicant needs to notify
CurrentAuthMode when key_mgmt changes; so NetworkManager can judge
whether it needs to request a password based on this.

Signed-off-by: xinpeng wang <wangxinpeng at uniontech.com>
---
 wpa_supplicant/sme.c            | 1 +
 wpa_supplicant/wpa_supplicant.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 2dad36ddc..d4a64a0de 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -980,6 +980,7 @@ static void sme_auth_start_cb(struct wpa_radio_work *work, int deinit)
 	wpa_s->rsnxe_len = 0;
 
 	sme_send_authentication(wpa_s, cwork->bss, cwork->ssid, 1);
+	wpas_notify_auth_changed(wpa_s);
 }
 
 
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 2dd3d8c7d..802544dfa 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4110,6 +4110,8 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
 	wpa_supplicant_initiate_eapol(wpa_s);
 	if (old_ssid != wpa_s->current_ssid)
 		wpas_notify_network_changed(wpa_s);
+	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME))
+		wpas_notify_auth_changed(wpa_s);
 }
 
 
-- 
2.20.1






More information about the Hostap mailing list