diff mbox series

wpa:change state to AUTHENTICATING after trigger external_auth ok

Message ID 20220729101750.425-1-wangxinpeng@uniontech.com
State Superseded
Headers show
Series wpa:change state to AUTHENTICATING after trigger external_auth ok | expand

Commit Message

xinpeng wang July 29, 2022, 10:17 a.m. UTC
When the connection to wifi fails, nm judges whether recall
ask-password-dialog according to the status change of wpa; for sae, if it
is in external authentication mode, when the authentication fails, the
state is from ASSOCIATING to DISCONNECTED; if it is not external
authentication, when the authentication fails, the state is AUTHENTICATING
To DISCONNECTED. Therefore, nm needs to ask for a password when the state
of wpa changes from AUTHENTICATING or ASSOCIATING to DISCONNECTED when sae.
This range is too large, and there may be misjudgments. Therefore, consider
changing the status to AUTHENTICATING for the successful triggering of
external authentication.

Signed-off-by: xinpeng wang <wangxinpeng@uniontech.com>
---
 wpa_supplicant/sme.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 2dad36ddc..1e317d06d 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1198,6 +1198,8 @@  void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
 		if (sme_handle_external_auth_start(wpa_s, data) < 0)
 			sme_send_external_auth_status(wpa_s,
 					      WLAN_STATUS_UNSPECIFIED_FAILURE);
+		else
+			wpa_supplicant_set_state(wpa_s,WPA_AUTHENTICATING);
 	} else if (data->external_auth.action == EXT_AUTH_ABORT) {
 		/* Report failure to driver for the wrong trigger */
 		sme_send_external_auth_status(wpa_s,