[PATCH v2] wpa:change state to AUTHENTICATING after trigger external_auth ok

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
Because sme_handle_external_auth_start will always succeed, even if wifi
doesn't exist at this time. So change the state after receiving the
response from the ap for the first time.

Signed-off-by: xinpeng wang <wangxinpeng@xxxxxxxxxxxxx>
---
 wpa_supplicant/sme.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 28ac03f23..2126e085d 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1506,8 +1506,10 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
 		if (!external)
 			sme_send_authentication(wpa_s, wpa_s->current_bss,
 						wpa_s->current_ssid, 0);
-		else
+		else {
 			sme_external_auth_send_sae_confirm(wpa_s, sa);
+			wpa_supplicant_set_state(wpa_s,WPA_AUTHENTICATING);
+		}
 		return 0;
 	} else if (auth_transaction == 2) {
 		if (status_code != WLAN_STATUS_SUCCESS)
-- 
2.20.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux