changeset 4230:bdf512764978 draft

dhcp6: don't drop when still asking for delegation
author Roy Marples <roy@marples.name>
date Fri, 02 Mar 2018 13:58:52 +0000
parents 12388193ccdc
children 0dcc72ad719c
files src/dhcp6.c
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Sun Feb 25 16:31:23 2018 +0000
+++ b/src/dhcp6.c	Fri Mar 02 13:58:52 2018 +0000
@@ -3858,18 +3858,11 @@
 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;
-	}
+	if (dhcp6_hasprefixdelegation(ifp) == 0)
 #endif
-	dhcp6_drop(ifp, "EXPIRE6");
+		dhcp6_drop(ifp, "EXPIRE6");
 }
 
 void