changeset 5109:a7b7abb6211c draft

Note that setting pltime to zero for stale addresses isn't RFC compliant But also note we need to do this to ensure the kernel tries to use better addresses.
author Roy Marples <roy@marples.name>
date Wed, 01 Apr 2020 16:12:37 +0100
parents b2ea9faab536
children d0f726abddff
files src/dhcp6.c src/ipv6nd.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Wed Apr 01 13:22:15 2020 +0100
+++ b/src/dhcp6.c	Wed Apr 01 16:12:37 2020 +0100
@@ -2416,6 +2416,9 @@
 			if (ia->prefix_vltime != 0)
 				logdebugx("%s: %s: became stale",
 				    ia->iface->name, ia->saddr);
+			/* Technically this violates RFC 8415 18.2.10.1,
+			 * but we need a mechanism to tell the kernel to
+			 * try and prefer other addresses. */
 			ia->prefix_pltime = 0;
 		} else if (ia->prefix_vltime == 0)
 			loginfox("%s: %s: no valid lifetime",
--- a/src/ipv6nd.c	Wed Apr 01 13:22:15 2020 +0100
+++ b/src/ipv6nd.c	Wed Apr 01 16:12:37 2020 +0100
@@ -1422,6 +1422,9 @@
 			continue;
 		ipv6nd_findmarkstale(rap, ia, true);
 		logdebugx("%s: %s: became stale", ifp->name, ia->saddr);
+		/* Technically this violates RFC 4861 6.3.4,
+		 * but we need a mechanism to tell the kernel to
+		 * try and prefer other addresses. */
 		ia->prefix_pltime = 0;
 	}