diff options
| author | Roy Marples <roy@marples.name> | 2020-03-10 12:19:03 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-03-10 12:19:03 +0000 |
| commit | a287b9f1929cddc05cac164003385f85adf54266 (patch) | |
| tree | de18916092174ca9687731b678b3cbce0315e991 /src/ipv6nd.c | |
| parent | 3f3a2bb8d94a255e9d2fff3b12a35418b5b7be41 (diff) | |
| download | dhcpcd-a287b9f1929cddc05cac164003385f85adf54266.tar.xz | |
IPv6ND: Mark stale addresses/prefixes with a pltime of zero.
This mirrors DHCPv6 behaviour.
Diffstat (limited to 'src/ipv6nd.c')
| -rw-r--r-- | src/ipv6nd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c index 3f5e191a..d548f6b0 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -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); |
