]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv6ND: Mark stale addresses/prefixes with a pltime of zero.
authorRoy Marples <roy@marples.name>
Tue, 10 Mar 2020 12:19:03 +0000 (12:19 +0000)
committerRoy Marples <roy@marples.name>
Tue, 10 Mar 2020 12:19:03 +0000 (12:19 +0000)
This mirrors DHCPv6 behaviour.

src/ipv6nd.c

index 3f5e191af3c7f5d90d33d6512ed9e37d208821ac..d548f6b0b15604bfb0bb3513daed696b9d0a2f91 100644 (file)
@@ -1359,6 +1359,13 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
                }
        }
 
+       TAILQ_FOREACH(ia, &rap->addrs, next) {
+               if (!(ia->flags & IPV6_AF_STALE) || ia->prefix_pltime == 0)
+                       continue;
+               logdebugx("%s: %s: became stale", ifp->name, ia->saddr);
+               ia->prefix_pltime = 0;
+       }
+
        if (new_data && !has_address && rap->lifetime && !ipv6_anyglobal(ifp))
                logwarnx("%s: no global addresses for default route",
                    ifp->name);