]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Clear wpa_s->disconnected on ctrl_iface FLUSH
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 8 Dec 2014 14:22:13 +0000 (16:22 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 8 Dec 2014 14:22:13 +0000 (16:22 +0200)
This is needed to get into more consistent state after the FLUSH
command. DISCONNECT followed by FLUSH could result in
wpa_s->disconnected being left to 1 and this resulted in a test failure,
e.g., when running wpas_ctrl_dup_network followed by
wpas_ctrl_enable_disable_network where the latter was expecting
ENABLE_NETWORK on a disabled network to connect automatically and that
does not happen if wpa_s->disconnected == 1.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/ctrl_iface.c

index abf5f522a06e3e49a1c311d3131c3c77191b8b44..2e83e057143d752ea1c9954544beac61453bb699 100644 (file)
@@ -6011,6 +6011,8 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
 #ifdef CONFIG_TESTING_OPTIONS
        wpa_s->extra_roc_dur = 0;
 #endif /* CONFIG_TESTING_OPTIONS */
+
+       wpa_s->disconnected = 0;
 }