Browse Source

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 <jouni@qca.qualcomm.com>
Jouni Malinen 10 years ago
parent
commit
97cfe110dc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      wpa_supplicant/ctrl_iface.c

+ 2 - 0
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;
 }