Skip to content

Commit

Permalink
DHCPv6: Don't re-INFORM if the RA changes
Browse files Browse the repository at this point in the history
RFC 8415 21.23
If the Reply to an Information-request message does not contain this
option, the client MUST behave as if the option with the value
IRT_DEFAULT was provided.

So we should not be influenced by only the RA changing the pl/vl
times of it's addresses.
  • Loading branch information
rsmarples committed May 4, 2024
1 parent 40c99e5 commit dfb0dc2
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/dhcp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -3965,20 +3965,16 @@ dhcp6_start(struct interface *ifp, enum DH6S init_state)
case DH6S_INIT:
goto gogogo;
case DH6S_INFORM:
/* RFC 8415 21.23
* If D6_OPTION_INFO_REFRESH_TIME does not exist
* then we MUST refresh by IRT_DEFAULT seconds
* and should not be influenced by only the
* pl/vl time of the RA changing. */
if (state->state == DH6S_INIT ||
state->state == DH6S_INFORMED ||
(state->state == DH6S_DISCOVER &&
!(ifp->options->options & DHCPCD_IA_FORCED) &&
!ipv6nd_hasradhcp(ifp, true)))
{
/* We don't want log spam when the RA
* has just adjusted it's prefix times. */
if (state->state != DH6S_INFORMED) {
state->new_start = true;
state->failed = false;
}
dhcp6_startinform(ifp);
}
break;
case DH6S_REQUEST:
if (ifp->options->options & DHCPCD_DHCP6 &&
Expand Down

0 comments on commit dfb0dc2

Please sign in to comment.