From: phessler Date: Sun, 30 Apr 2023 13:08:40 +0000 (+0000) Subject: Remove artifical limit of 2 hours on a PIO lifetime, as recommended by X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad2cde20e7b40b8063986e7667b8c4af28133894;p=openbsd 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@ --- 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;