]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Clear connect_without_scan on network profile removal
authorJouni Malinen <j@w1.fi>
Sat, 20 Apr 2024 15:37:35 +0000 (18:37 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 20 Apr 2024 15:42:26 +0000 (18:42 +0300)
wpa_s->connect_without_scan could have been left pointing to invalid
network when a network profile was removed. It seems to be possible for
this to happen in some hwsim test case scenarios under specific timing,
but the exact reason for this is not clear. In any case, this pointer
needs to be cleared.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/notify.c

index 6d5dbcc298f2d62556176fa93117ed26872e19cb..e967dc8ff13a9f22e49e8281cec2cd5873ccb9a6 100644 (file)
@@ -400,6 +400,8 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
                wpa_s->ml_connect_probe_ssid = NULL;
                wpa_s->ml_connect_probe_bss = NULL;
        }
+       if (wpa_s->connect_without_scan == ssid)
+               wpa_s->connect_without_scan = NULL;
 #if defined(CONFIG_SME) && defined(CONFIG_SAE)
        if (wpa_s->sme.ext_auth_wpa_ssid == ssid)
                wpa_s->sme.ext_auth_wpa_ssid = NULL;