diff mbox series

dbus:Add dbus notify when key_mgmt changes

Message ID 20220728081942.4741-1-wangxinpeng@uniontech.com
State Accepted
Headers show
Series dbus:Add dbus notify when key_mgmt changes | expand

Commit Message

xinpeng wang July 28, 2022, 8:19 a.m. UTC
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@uniontech.com>
---
 wpa_supplicant/sme.c            | 1 +
 wpa_supplicant/wpa_supplicant.c | 2 ++
 2 files changed, 3 insertions(+)

Comments

Jouni Malinen Nov. 27, 2022, 12:23 p.m. UTC | #1
On Thu, Jul 28, 2022 at 04:19:42PM +0800, xinpeng wang wrote:
> 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.

Thanks, applied.
diff mbox series

Patch

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);
 }