From: Roy Marples Date: Wed, 11 Mar 2020 01:13:50 +0000 (+0000) Subject: RA: Remove timecheck on sorted router list X-Git-Tag: v8.1.7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48d7cc90ae7d69f3520515ff7ba80f371d363401;p=thirdparty%2Fdhcpcd.git RA: Remove timecheck on sorted router list Newer is always at the end, mirrors master branch. --- diff --git a/src/ipv6nd.c b/src/ipv6nd.c index 3904c3b0..dc8ec401 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -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; }