summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-08-30 12:20:02 +0100
committerRoy Marples <roy@marples.name>2019-08-30 12:20:02 +0100
commitfc02542dfaaa580dce2fe3eaf8565d2d1551f70b (patch)
tree71a33ae78086485a6eeb6f012042d959d4c6c2e6 /src/ipv6.c
parent80f8d8d81e551dac7891f9a5923d3395db7edbeb (diff)
downloaddhcpcd-fc02542dfaaa580dce2fe3eaf8565d2d1551f70b.tar.xz
Fix a crash for ipv4 only.
Diffstat (limited to 'src/ipv6.c')
-rw-r--r--src/ipv6.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index 9ee0039a..c296679b 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -2295,6 +2295,9 @@ inet6_raroutes(rb_tree_t *routes, struct dhcpcd_ctx *ctx)
struct ra *rap;
const struct ipv6_addr *addr;
+ if (ctx->ra_routers == NULL)
+ return 0;
+
TAILQ_FOREACH(rap, ctx->ra_routers, next) {
if (rap->expired)
continue;