aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2014-11-15 01:35:29 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-16 17:43:11 (GMT)
commiteac02316421dd27bd3b938bef6ff91a22fa42fc7 (patch)
tree5094fc720431a68cb204efbb5e1238cddfb2e020 /wpa_supplicant/events.c
parent5cfb672ddef7c4e6a7bd424345c8f962a6f94dfc (diff)
downloadhostap-eac02316421dd27bd3b938bef6ff91a22fa42fc7.zip
hostap-eac02316421dd27bd3b938bef6ff91a22fa42fc7.tar.gz
hostap-eac02316421dd27bd3b938bef6ff91a22fa42fc7.tar.bz2
mesh: Fix segmentation fault by repeating MESH_GROUP_ADD/REMOVE
Signed-off-by: Natsuki Itaya <Natsuki.Itaya@jp.sony.com> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 6761c1a..c1684bf 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3475,9 +3475,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
#endif /* CONFIG_AP */
break;
case EVENT_NEW_PEER_CANDIDATE:
+#ifdef CONFIG_MESH
+ if (!wpa_s->ifmsh || !data)
+ break;
wpa_mesh_notify_peer(wpa_s, data->mesh_peer.peer,
data->mesh_peer.ies,
data->mesh_peer.ie_len);
+#endif /* CONFIG_MESH */
break;
default:
wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event);