summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-04-01 09:16:47 +0100
committerRoy Marples <roy@marples.name>2020-04-01 09:16:47 +0100
commit9b0a3c69441c077b13b915e6ee0040afd51ffa06 (patch)
treedb956efc1264c546d29ede303415b8f855091384 /src/ipv6nd.c
parentc099165a7ec40e853ada62788b15431145e95465 (diff)
downloaddhcpcd-9b0a3c69441c077b13b915e6ee0040afd51ffa06.tar.xz
ND: Check matching iface to make stale and add commentary
Diffstat (limited to 'src/ipv6nd.c')
-rw-r--r--src/ipv6nd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index 81a80550..0089b269 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -1395,8 +1395,10 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
if (!(ia->flags & IPV6_AF_STALE) || ia->prefix_pltime == 0)
continue;
TAILQ_FOREACH(rap2, ctx->ra_routers, next) {
- if (rap2->expired)
+ if (rap2->iface != rap->iface || rap2->expired)
continue;
+ /* Other routers may have zeroed the address so it
+ * won't be stale for them. */
TAILQ_FOREACH(ia2, &rap2->addrs, next) {
if (IN6_ARE_ADDR_EQUAL(&ia->prefix,
&ia2->prefix) &&