From: Roy Marples Date: Fri, 2 Mar 2018 13:58:52 +0000 (+0000) Subject: dhcp6: don't drop when still asking for delegation X-Git-Tag: v7.0.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdea27e3e49dcece88abecd4042dfaf6deacd7c1;p=thirdparty%2Fdhcpcd.git dhcp6: don't drop when still asking for delegation --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 905c7fbe..b05a90d2 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -3858,18 +3858,11 @@ dhcp6_free(struct interface *ifp) void dhcp6_dropnondelegates(struct interface *ifp) { -#ifndef SMALL - struct dhcp6_state *state; - struct ipv6_addr *ia; - if ((state = D6_STATE(ifp)) == NULL) - return; - TAILQ_FOREACH(ia, &state->addrs, next) { - if (ia->flags & (IPV6_AF_DELEGATED | IPV6_AF_DELEGATEDPFX)) - return; - } +#ifndef SMALL + if (dhcp6_hasprefixdelegation(ifp) == 0) #endif - dhcp6_drop(ifp, "EXPIRE6"); + dhcp6_drop(ifp, "EXPIRE6"); } void