From d451274d1aed45623c997b9bd6836b4dd76c3003 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 26 Jun 2024 14:09:41 +0100 Subject: [PATCH] DHCP6: Add commentary around why we read leases Fixes #336. --- src/dhcp6.c | 7 +++++++ src/dhcpcd.c | 1 + 2 files changed, 8 insertions(+) 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); -- 2.47.3