]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Add commentary around why we read leases
authorRoy Marples <roy@marples.name>
Wed, 26 Jun 2024 13:09:41 +0000 (14:09 +0100)
committerRoy Marples <roy@marples.name>
Wed, 26 Jun 2024 13:09:41 +0000 (14:09 +0100)
Fixes #336.

src/dhcp6.c
src/dhcpcd.c

index 50154b9a7c15dd28e2c1b4ca7a89befa359322ac..217f82b9a12a075ae379bca87ea6598bb9b2b6a7 100644 (file)
@@ -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:
index 2cadf29156f06996dca432658fa02aed7992e467..37993e64a99df1bdb5d0a8eeb6692c5414a2d47f 100644 (file)
@@ -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);