From ad2cde20e7b40b8063986e7667b8c4af28133894 Mon Sep 17 00:00:00 2001 From: phessler Date: Sun, 30 Apr 2023 13:08:40 +0000 Subject: [PATCH] Remove artifical limit of 2 hours on a PIO lifetime, as recommended by draft-ietf-6man-slaac-renum-05 and implemented by Linux in 2020. OK florian@ --- sbin/slaacd/engine.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index 7ca00650ecf..07b818a6909 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.84 2022/08/26 00:02:08 kn Exp $ */ +/* $OpenBSD: engine.c,v 1.85 2023/04/30 13:08:40 phessler Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -1927,7 +1927,7 @@ update_iface_ra_prefix(struct slaacd_iface *iface, struct radv *ra, struct radv_prefix *prefix) { struct address_proposal *addr_proposal; - uint32_t remaining_lifetime, pltime, vltime; + uint32_t pltime, vltime; int found, found_temporary, duplicate_found; found = found_temporary = duplicate_found = 0; @@ -1966,16 +1966,7 @@ update_iface_ra_prefix(struct slaacd_iface *iface, struct radv *ra, continue; } - remaining_lifetime = real_lifetime(&addr_proposal->uptime, - addr_proposal->vltime); - - /* RFC 4862 5.5.3 two hours rule */ -#define TWO_HOURS 2 * 3600 - if (prefix->vltime > TWO_HOURS || - prefix->vltime >= remaining_lifetime) - vltime = prefix->vltime; - else - vltime = TWO_HOURS; + vltime = prefix->vltime; if (addr_proposal->temporary) { struct timespec now; -- 2.20.1