]> git.ipfire.org Git - thirdparty/hostap.git/commit
Set current_ssid before changing state to ASSOCIATING
authorXinyue Ling <quic_xinyling@quicinc.com>
Mon, 13 Jun 2022 06:29:56 +0000 (14:29 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 16 Jun 2022 15:02:07 +0000 (18:02 +0300)
commit6b461f68c72e127777e2b4aa7511d0e6318d57e2
treee2a3d1ba63ff4a6687661bce68b374278b55ad15
parent8dd82674137c5aa8bd77040feac306e2cc78172a
Set current_ssid before changing state to ASSOCIATING

For hidden GBK encoding of a Chinese SSID, both the UTF-8 and GBK
encoding profiles are added into wpa_supplicant to make sure the
connection succeeds. In this situation, wpa_supplicant_select_network()
will not be called so current_ssid is NULL when association begins.

Android monitors the WPA_EVENT_STATE_CHANGE event to get the SSID and
BSSID. When connecting to a Chinese SSID, in case of association
rejection happens, Android will report null SSID to OEM APP because
current_ssid is updated after wpa_supplicant_set_state(wpa_s,
WPA_ASSOCIATING), which may cause confusion.

Fix this by setting the current_ssid before changing state to
ASSOCIATING.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/wpa_supplicant.c