From e4a35f07d9da7671be35639e0c6da8b4565e8b3a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 30 Nov 2014 15:47:07 +0200 Subject: [PATCH] mesh: Skip fast-association when using connect_without_scan The mesh group addition was designed to use wpa_s->connect_without_scan to skip a scan. That path was skipped if wpa_supplicant_fast_associate() allowed previous scan results to be used. This could result in undesired double-initialization attempt for the mesh interface. Avoid this by not using wpa_supplicant_fast_associate() when wpa_s->connect_without_scan is set. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 9d4a14e92..5eae00b53 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2354,7 +2354,8 @@ void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s, wpa_s->disconnected = 0; wpa_s->reassociate = 1; - if (wpa_supplicant_fast_associate(wpa_s) != 1) + if (wpa_s->connect_without_scan || + wpa_supplicant_fast_associate(wpa_s) != 1) wpa_supplicant_req_scan(wpa_s, 0, disconnected ? 100000 : 0); if (ssid)