]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcp6: don't drop when still asking for delegation
authorRoy Marples <roy@marples.name>
Fri, 2 Mar 2018 13:58:52 +0000 (13:58 +0000)
committerRoy Marples <roy@marples.name>
Fri, 2 Mar 2018 13:58:52 +0000 (13:58 +0000)
src/dhcp6.c

index 905c7fbe7f513d3c80f07f4320a9cbf5acab069d..b05a90d262f148194a1c19a78e68edb153dc89b6 100644 (file)
@@ -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