From 97cfe110dc9be4c33f33b23e98a308fe86ddb2e2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 8 Dec 2014 16:22:13 +0200 Subject: [PATCH] Clear wpa_s->disconnected on ctrl_iface FLUSH 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 --- wpa_supplicant/ctrl_iface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index abf5f522a..2e83e0571 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -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; }