From: Roy Marples Date: Wed, 6 Apr 2016 20:53:54 +0000 (+0000) Subject: Don't do ipv6 routes if ipv6 is disabled. X-Git-Tag: v6.10.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0480237e31fb49330bc5d547e1bb863bb94b94d9;p=thirdparty%2Fdhcpcd.git Don't do ipv6 routes if ipv6 is disabled. --- diff --git a/ipv6.c b/ipv6.c index f7451e40..d5755342 100644 --- a/ipv6.c +++ b/ipv6.c @@ -1472,8 +1472,10 @@ ipv6_freedrop(struct interface *ifp, int drop) ipv6_freedrop_addrs(&state->addrs, drop ? 2 : 0, NULL); if (drop) { - if_initrt6(ifp); - ipv6_buildroutes(ifp->ctx); + if (ifp->ctx->ipv6 != NULL) { + if_initrt6(ifp); + ipv6_buildroutes(ifp->ctx); + } } else { /* Because we need to cache the addresses we don't control, * we only free the state on when NOT dropping addresses. */