From: Roy Marples Date: Fri, 30 Aug 2024 08:37:36 +0000 (+0100) Subject: DHCP6: Mark everything excpept delegated addresses as stale X-Git-Tag: v10.1.0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88a93ff274d490f305565e9335611010bf9cde84;p=thirdparty%2Fdhcpcd.git DHCP6: Mark everything excpept delegated addresses as stale When parsing a lease. A Prefix Delegation is part of a lease and should follow the same rules for being stale as an address. --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 6b896bf2..3c7f156e 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -2373,7 +2373,9 @@ dhcp6_findia(struct interface *ifp, struct dhcp6_message *m, size_t l, i = e = 0; state = D6_STATE(ifp); TAILQ_FOREACH(ap, &state->addrs, next) { - if (!(ap->flags & (IPV6_AF_DELEGATED | IPV6_AF_DELEGATEDPFX))) + /* Anything not from a lease for this interface should be + * marked as stale. */ + if (!(ap->flags & IPV6_AF_DELEGATED)) ap->flags |= IPV6_AF_STALE; } @@ -2710,7 +2712,7 @@ out: return bytes; ex: - dhcp6_freedrop_addrs(ifp, 0, IPV6_AF_ANYDELEGATED, NULL); + dhcp6_freedrop_addrs(ifp, 0, IPV6_AF_DELEGATED, NULL); dhcp_unlink(ifp->ctx, state->leasefile); free(state->new); state->new = NULL;