From 1dba2f9f8e8acea671a72b5520ce74e6fbc8ae8a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 1 Apr 2020 09:16:47 +0100 Subject: [PATCH] ND: Check matching iface to make stale and add commentary --- src/ipv6nd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) && -- 2.47.2