diff mbox series

Current auth mode should be set as real auth type when authentication is in progress. Wpa has property "State" which indicating the authentication stage already. I think set auth mode as "INACTIVE" in all auth progress seems not good idea, because sometim

Message ID 20220311070258.27745-1-chenyunxiong@uniontech.com
State Accepted
Headers show
Series Current auth mode should be set as real auth type when authentication is in progress. Wpa has property "State" which indicating the authentication stage already. I think set auth mode as "INACTIVE" in all auth progress seems not good idea, because sometim | expand

Commit Message

ArisAachen March 11, 2022, 7:02 a.m. UTC
Signed-off-by: Aris Aachen <chenyunxiong@unionitech.com>
Signed-off-by: ArisAachen <chenyunxiong@uniontech.com>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Ceuleers March 11, 2022, 3:48 p.m. UTC | #1
On 11/03/2022 08:02, ArisAachen wrote:
> Signed-off-by: Aris Aachen <chenyunxiong@unionitech.com>
> Signed-off-by: ArisAachen <chenyunxiong@uniontech.com>
> ---
>  wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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) {

Could I suggest breaking up the commit message across multiple lines
rather than putting it all in the subject?
Jouni Malinen March 12, 2022, 5:05 p.m. UTC | #2
Thanks, applied.
diff mbox series

Patch

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) {