]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCPv6: Don't re-INFORM if the RA changes
authorRoy Marples <roy@marples.name>
Sat, 4 May 2024 22:33:11 +0000 (23:33 +0100)
committerRoy Marples <roy@marples.name>
Sat, 4 May 2024 22:33:11 +0000 (23:33 +0100)
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.

src/dhcp6.c

index 037cc242bf0f996cc4158480d68543a956bdebe8..e187a37606eefe24b1609d1efcc3ec8faef971de 100644 (file)
@@ -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 &&