aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@noack.us>2014-09-01 04:23:24 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-25 14:45:35 (GMT)
commita3335ef518f0ed11604597fd8e65a5d44efab4ac (patch)
treeaba1522223e9546fa01f0966e9cf4205d62dc24c /wpa_supplicant/events.c
parent5f92659d88f17ba8cd11210a70e17ba664a62d53 (diff)
downloadhostap-a3335ef518f0ed11604597fd8e65a5d44efab4ac.zip
hostap-a3335ef518f0ed11604597fd8e65a5d44efab4ac.tar.gz
hostap-a3335ef518f0ed11604597fd8e65a5d44efab4ac.tar.bz2
mesh: Avoid join if already joined a mesh group
Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Thomas Pedersen <thomas@noack.us>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 189dacd..fff4eb4 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) {