From 4051d2390fc0827bb0c3cb14209a32341ddb7a81 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 30 Aug 2019 12:20:02 +0100 Subject: [PATCH] Fix a crash for ipv4 only. --- src/ipv6.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.2