Skip to content

Commit

Permalink
DHCP6: Add commentary around why we read leases
Browse files Browse the repository at this point in the history
Fixes #336.
  • Loading branch information
rsmarples committed Jun 26, 2024
1 parent ea10a3d commit d451274
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dhcp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/dhcpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d451274

Please sign in to comment.