summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-11-27 11:30:41 +0100
committerHans Dedecker <dedeckeh@gmail.com>2015-11-27 14:41:20 +0100
commit32b977a5336612a5c01f7426c4d165685fa8aca0 (patch)
tree937fc48205929ecc28365e01e2be47b5477c3385 /src/router.c
parent01d3f9d64486ac1daa144848944e877e7f0cb762 (diff)
config: Close interface when ifindex cannot be resolved
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/router.c b/src/router.c
index 9907824..9711975 100644
--- a/src/router.c
+++ b/src/router.c
@@ -99,6 +99,9 @@ int setup_router_interface(struct interface *iface, bool enable)
uloop_timeout_cancel(&iface->timer_rs);
iface->timer_rs.cb = NULL;
+ if (iface->ifindex <= 0)
+ return -1;
+
setsockopt(router_event.uloop.fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP,
&all_nodes, sizeof(all_nodes));
setsockopt(router_event.uloop.fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP,