]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv6ND: Sort routers by reachability correctly. sort_routers
authorRoy Marples <roy@marples.name>
Mon, 24 Mar 2025 12:05:11 +0000 (12:05 +0000)
committerRoy Marples <roy@marples.name>
Mon, 24 Mar 2025 12:05:11 +0000 (12:05 +0000)
Maybe fixes #492.

src/ipv6nd.c

index 39fe4731a6f9a56d24c95ee7c64b862cc9413e3e..c5e8546a241da32073f0b2e591f0f8d58f6372bf 100644 (file)
@@ -502,7 +502,7 @@ ipv6nd_sortrouters(struct dhcpcd_ctx *ctx)
                                continue;
                        if (ra1->lifetime == 0 && ra2->lifetime != 0)
                                continue;
-                       if (!ra1->isreachable && ra2->reachable)
+                       if (!ra1->isreachable && ra2->isreachable)
                                continue;
                        if (ipv6nd_rtpref(ra1->flags) <= ipv6nd_rtpref(ra2->flags))
                                continue;