diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2023-04-30 13:08:41 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2023-04-30 13:08:41 +0000 |
commit | 1c3c5d3ef0b5d26a56d455d738122bf80541e672 (patch) | |
tree | 6239ccc27b9f1cf8d4214806721b2536cb290358 /sbin/slaacd | |
parent | 9201571a23cc67f3b4572b2a97e94d7c7b4cc03f (diff) |
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@
Diffstat (limited to 'sbin/slaacd')
-rw-r--r-- | sbin/slaacd/engine.c | 15 |
1 files 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 <florian@openbsd.org> @@ -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; |