]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv6ND: Sort routers by reachability correctly.
authorRoy Marples <roy@marples.name>
Tue, 20 May 2025 23:54:58 +0000 (00:54 +0100)
committerRoy Marples <roy@marples.name>
Tue, 20 May 2025 23:54:58 +0000 (00:54 +0100)
Related to #492.

src/ipv6nd.c

index cad5ce5bc31d23c796384106634a440d7aacc3d5..09e0d16ed2e7b1dd390f131a753fafcd54e17ad1 100644 (file)
@@ -507,7 +507,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;