From a3335ef518f0ed11604597fd8e65a5d44efab4ac Mon Sep 17 00:00:00 2001 From: Thomas Pedersen Date: Mon, 1 Sep 2014 00:23:24 -0400 Subject: [PATCH] mesh: Avoid join if already joined a mesh group Signed-off-by: Javier Lopez Signed-off-by: Thomas Pedersen --- wpa_supplicant/events.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 189dacd0c..fff4eb4e7 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1382,6 +1382,13 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s, */ return 1; } else { +#ifdef CONFIG_MESH + if (wpa_s->ifmsh) { + wpa_msg(wpa_s, MSG_INFO, + "Avoiding join because we already joined a mesh group"); + return 0; + } +#endif /* CONFIG_MESH */ wpa_dbg(wpa_s, MSG_DEBUG, "No suitable network found"); ssid = wpa_supplicant_pick_new_network(wpa_s); if (ssid) {