]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
RA: Remove timecheck on sorted router list
authorRoy Marples <roy@marples.name>
Wed, 11 Mar 2020 01:13:50 +0000 (01:13 +0000)
committerRoy Marples <roy@marples.name>
Wed, 11 Mar 2020 01:13:50 +0000 (01:13 +0000)
Newer is always at the end, mirrors master branch.

src/ipv6nd.c

index 3904c3b0aafb20c85e05c1fc35aab0f9859f3ce2..dc8ec40177df3a1f12262fb7def5d72158917081 100644 (file)
@@ -598,8 +598,9 @@ ipv6nd_sortrouters(struct dhcpcd_ctx *ctx)
                        if (ipv6nd_rtpref(ra1) <= ipv6nd_rtpref(ra2))
                                continue;
                        /* All things being equal, prefer older routers. */
-                       if (timespeccmp(&ra1->acquired, &ra2->acquired, >=))
-                               continue;
+                       /* We don't need to check time, becase newer
+                        * routers are always added to the tail and then
+                        * sorted. */
                        TAILQ_INSERT_BEFORE(ra2, ra1, next);
                        break;
                }