]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
ND: Check matching iface to make stale and add commentary
authorRoy Marples <roy@marples.name>
Wed, 1 Apr 2020 08:16:47 +0000 (09:16 +0100)
committerRoy Marples <roy@marples.name>
Wed, 1 Apr 2020 08:16:47 +0000 (09:16 +0100)
src/ipv6nd.c

index 81a80550cafdcb8652d04bfa9ca8942546a84e87..0089b2694ccb5f0748036c44a024f0cce308602e 100644 (file)
@@ -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) &&