summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-03-10 12:19:03 +0000
committerRoy Marples <roy@marples.name>2020-03-10 12:19:03 +0000
commit3e718d3696104aaab74d535e1f85554fed0a6dcd (patch)
treede18916092174ca9687731b678b3cbce0315e991 /src/ipv6nd.c
parentb4c6afc44eb61efcf1ee0686c2bab6e6255d168c (diff)
downloaddhcpcd-3e718d3696104aaab74d535e1f85554fed0a6dcd.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.c7
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);