changeset 5086:7d2445b5174b draft

RA: Remove timecheck on sorted router list Newer is always at the end, mirrors master branch.
author Roy Marples <roy@marples.name>
date Wed, 11 Mar 2020 01:13:50 +0000
parents 7774c17e131e
children ff170c25b210
files src/ipv6nd.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ipv6nd.c	Wed Mar 11 01:11:41 2020 +0000
+++ b/src/ipv6nd.c	Wed Mar 11 01:13:50 2020 +0000
@@ -598,8 +598,9 @@
 			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;
 		}