]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
RA: Prefer older routers at the preference
authorRoy Marples <roy@marples.name>
Wed, 11 Mar 2020 01:11:41 +0000 (01:11 +0000)
committerRoy Marples <roy@marples.name>
Wed, 11 Mar 2020 01:11:50 +0000 (01:11 +0000)
src/ipv6nd.c

index 586ad943a10e70aeab69e9e2d870b9871654fae9..3904c3b0aafb20c85e05c1fc35aab0f9859f3ce2 100644 (file)
@@ -595,7 +595,7 @@ ipv6nd_sortrouters(struct dhcpcd_ctx *ctx)
                                continue;
                        if (!ra1->isreachable && ra2->reachable)
                                continue;
-                       if (ipv6nd_rtpref(ra1) < ipv6nd_rtpref(ra2))
+                       if (ipv6nd_rtpref(ra1) <= ipv6nd_rtpref(ra2))
                                continue;
                        /* All things being equal, prefer older routers. */
                        if (timespeccmp(&ra1->acquired, &ra2->acquired, >=))