summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-03-21 13:59:23 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-03-21 13:59:23 +0000
commit7d0ca2ea2c90af330c343eb28f75d6fbb00d92cb (patch)
tree7410c857cea91d11969ec1ff6ad91b3cad6f048f /sbin
parentfcfff489169c028ac61c8e62a03666fd8056e964 (diff)
Don't warn that we can't form a temporary address when a router
deprecates a prefix by sending a pltime of 0, this is normal. Continue warning when the pltime is smaller than 5 as this is almost certainly a configuration error. Found the hard way by & OK otto.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/slaacd/engine.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c
index 7b49b330328..35eb7606272 100644
--- a/sbin/slaacd/engine.c
+++ b/sbin/slaacd/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.69 2021/03/20 17:07:49 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.70 2021/03/21 13:59:22 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -1932,14 +1932,15 @@ update_iface_ra_prefix(struct slaacd_iface *iface, struct radv *ra,
/* privacy addresses do not depend on eui64 */
if (!found_privacy && iface->autoconfprivacy) {
- if (prefix->pltime < PRIV_REGEN_ADVANCE) {
+ if (prefix->pltime >= PRIV_REGEN_ADVANCE) {
+ /* new privacy proposal */
+ gen_address_proposal(iface, ra, prefix, 1);
+ } else if (prefix->pltime > 0) {
log_warnx("%s: pltime from %s is too small: %d < %d; "
"not generating privacy address", __func__,
sin6_to_str(&ra->from), prefix->pltime,
PRIV_REGEN_ADVANCE);
- } else
- /* new privacy proposal */
- gen_address_proposal(iface, ra, prefix, 1);
+ }
}
}