From: Roy Marples Date: Sat, 16 Apr 2016 21:11:54 +0000 (+0000) Subject: Don't drop DHCPv6 if the interface is delegated to when there are no IPv6 routers... X-Git-Tag: v6.10.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d3fc0cc4f9761eda289ac0a3383a212d5cba952;p=thirdparty%2Fdhcpcd.git Don't drop DHCPv6 if the interface is delegated to when there are no IPv6 routers for it. --- diff --git a/ipv6nd.c b/ipv6nd.c index 716283a3..edef851b 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -255,6 +255,15 @@ ipv6nd_makersprobe(struct interface *ifp) return 0; } +static void ipv6nd_dropdhcp6(struct interface *ifp) +{ + const struct dhcp6_state *d6; + + /* Don't drop DHCP6 if the interface is delegated to. */ + if ((d6 = D6_CSTATE(ifp)) != NULL && d6->state != DH6S_DELEGATED) + dhcp6_drop(ifp, "EXPIRE6"); +} + static void ipv6nd_sendrsprobe(void *arg) { @@ -318,7 +327,7 @@ ipv6nd_sendrsprobe(void *arg) logger(ifp->ctx, LOG_WARNING, "%s: no IPv6 Routers available", ifp->name); ipv6nd_drop(ifp); - dhcp6_drop(ifp, "EXPIRE6"); + ipv6nd_dropdhcp6(ifp); } } @@ -1383,7 +1392,7 @@ ipv6nd_expirera(void *arg) /* No valid routers? Kill any DHCPv6. */ if (!validone) - dhcp6_drop(ifp, "EXPIRE6"); + ipv6nd_dropdhcp6(ifp); } void