]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Note that setting pltime to zero for stale addresses isn't RFC compliant
authorRoy Marples <roy@marples.name>
Wed, 1 Apr 2020 15:12:37 +0000 (16:12 +0100)
committerRoy Marples <roy@marples.name>
Wed, 1 Apr 2020 15:12:37 +0000 (16:12 +0100)
But also note we need to do this to ensure the kernel tries to use
better addresses.

src/dhcp6.c
src/ipv6nd.c

index 129d5f0eac1f4f1f7ce4af63ac66dfe0fbe479a2..d345b8349b8513cf32b55f49f1919c5086975665 100644 (file)
@@ -2416,6 +2416,9 @@ dhcp6_deprecateaddrs(struct ipv6_addrhead *addrs)
                        if (ia->prefix_vltime != 0)
                                logdebugx("%s: %s: became stale",
                                    ia->iface->name, ia->saddr);
+                       /* Technically this violates RFC 8415 18.2.10.1,
+                        * but we need a mechanism to tell the kernel to
+                        * try and prefer other addresses. */
                        ia->prefix_pltime = 0;
                } else if (ia->prefix_vltime == 0)
                        loginfox("%s: %s: no valid lifetime",
index ba4eb8ca59fe21901f128d4854941f8c33ea4b7b..2860e67ce1b1a7d0be07ad96356b99fe4b6babfe 100644 (file)
@@ -1422,6 +1422,9 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
                        continue;
                ipv6nd_findmarkstale(rap, ia, true);
                logdebugx("%s: %s: became stale", ifp->name, ia->saddr);
+               /* Technically this violates RFC 4861 6.3.4,
+                * but we need a mechanism to tell the kernel to
+                * try and prefer other addresses. */
                ia->prefix_pltime = 0;
        }