diff options
| author | Roy Marples <roy@marples.name> | 2020-03-11 01:13:50 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-03-11 01:13:50 +0000 |
| commit | 48d7cc90ae7d69f3520515ff7ba80f371d363401 (patch) | |
| tree | 01434c800f6855fe0b9bc3f6de912486e8131bd1 | |
| parent | 751765bdfdd4b2016f45e6920f441a9cea06dc16 (diff) | |
| download | dhcpcd-48d7cc90ae7d69f3520515ff7ba80f371d363401.tar.xz | |
RA: Remove timecheck on sorted router list
Newer is always at the end, mirrors master branch.
| -rw-r--r-- | src/ipv6nd.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |
