summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-03-20 10:30:51 +0100
committerSteven Barth <steven@midlink.org>2014-03-20 10:30:51 +0100
commita85ccf1aa14d3d860e6ac0e7c56ba4695462afa1 (patch)
tree9bb5c48111d3d2bd2be249de8276622b1c08aa85 /src/router.c
parent4b23559937ccefd2df7d020219c7962568355a12 (diff)
Don't segfault when there is no IPv6 support
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 3ba552d..772d770 100644
--- a/src/router.c
+++ b/src/router.c
@@ -88,6 +88,9 @@ int init_router(void)
int setup_router_interface(struct interface *iface, bool enable)
{
+ if (!fp_route || router_event.uloop.fd < 0)
+ return -1;
+
struct ipv6_mreq all_nodes = {ALL_IPV6_NODES, iface->ifindex};
struct ipv6_mreq all_routers = {ALL_IPV6_ROUTERS, iface->ifindex};