From: ArisAachen Date: Fri, 11 Mar 2022 07:02:58 +0000 (+0800) Subject: dbus: Set CurrentAuthMode to INACTIVE only if network is not selected X-Git-Tag: hostap_2_11~2164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a157fe92ff44278ed9be18dca27ae2961b3fc48;p=thirdparty%2Fhostap.git dbus: Set CurrentAuthMode to INACTIVE only if network is not selected CurrentAuthMode should be set as a real auth type when authentication is in progress. wpa_supplicant has a property "State" which indicates the authentication stage already. I think setting auth mode as "INACTIVE" in all auth progress stages is not a good idea, because sometimes we need to handle this connection according to the auth type even when authentication is not complete. For example, NetworkManager may recall ask-password-dialog when auth mode is "wpa-psk" and "sae", try next access point when auth mode is "EAP-xx" when password is incorrect. Since "CurrentAuthMode" is set as "INACTIVE" in all not fully completed situations, we do not know how to handle it. Signed-off-by: Aris Aachen Signed-off-by: ArisAachen --- diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index 959a68b4c..1c9ded09a 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -3951,7 +3951,7 @@ dbus_bool_t wpas_dbus_getter_current_auth_mode( const char *auth_mode; char eap_mode_buf[WPAS_DBUS_AUTH_MODE_MAX]; - if (wpa_s->wpa_state != WPA_COMPLETED) { + if (wpa_s->wpa_state <= WPA_SCANNING) { auth_mode = "INACTIVE"; } else if (wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X || wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA) {