]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: Add dbus notify when wpa_s->key_mgmt changes
authorxinpeng wang <wangxinpeng@uniontech.com>
Thu, 28 Jul 2022 08:19:42 +0000 (16:19 +0800)
committerJouni Malinen <j@w1.fi>
Sun, 27 Nov 2022 12:18:53 +0000 (14:18 +0200)
For WPA2/WPA3 authentication mode, wpa_supplicant needs to notify
CurrentAuthMode property change when wpa_s->key_mgmt changes, so
NetworkManager can judge whether it needs to request a password based on
this.

Call wpas_notify_auth_changed() when starting a new connection item,
i.e., after having updated wpa_s->key_mgmt.

Signed-off-by: xinpeng wang <wangxinpeng@uniontech.com>
wpa_supplicant/sme.c
wpa_supplicant/wpa_supplicant.c

index e1abb8b1bb6ace81d4efef8d1e7df0ccb287a711..5698b3da896199a5c8a4faea31fac3813ab0fd66 100644 (file)
@@ -1027,6 +1027,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);
 }
 
 
index ce3583fdeac0e2a04921b99ccb59b080ee9965a2..2739e93df0a02a33bd3ea83be2d6b7e2f654f0fc 100644 (file)
@@ -4254,6 +4254,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);
 }