From: Roy Marples Date: Wed, 26 Jun 2024 13:09:41 +0000 (+0100) Subject: DHCP6: Add commentary around why we read leases X-Git-Tag: v10.0.9~14 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d451274d1aed45623c997b9bd6836b4dd76c3003;p=thirdparty%2Fdhcpcd.git DHCP6: Add commentary around why we read leases Fixes #336. --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 50154b9a..217f82b9 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -4025,6 +4025,13 @@ dhcp6_start(struct interface *ifp, enum DH6S init_state) } break; case DH6S_CONFIRM: + /* + * CONFIRM a prior lease from a RA. + * This could be triggered by a roaming interface. + * We could also get here if we are delegated to. + * Now that we don't remove delegated addresses when + * reading the lease file this is the safe path. + */ init_state = DH6S_INIT; goto gogogo; default: diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 2cadf291..37993e64 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -962,6 +962,7 @@ dhcpcd_startinterface(void *arg) else if (ifo->options & DHCPCD_INFORM6) d6_state = DH6S_INFORM; else + /* CONFIRM lease triggered from RA */ d6_state = DH6S_CONFIRM; if (dhcp6_start(ifp, d6_state) == -1) logerr("%s: dhcp6_start", ifp->name);