From 830e7b7075b18de7727dff85cb1179ee68b16a83 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2021 13:59:22 +0000 Subject: [PATCH] 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. --- sbin/slaacd/engine.c | 11 ++++++----- 1 file 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 @@ -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); + } } } -- 2.20.1