summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2021-03-21 13:59:22 +0000
committerflorian <florian@openbsd.org>2021-03-21 13:59:22 +0000
commit830e7b7075b18de7727dff85cb1179ee68b16a83 (patch)
tree5d28ab4a10073c4f01576816cb5e3ee6b01e7a5e /sbin
parentAdd quoted strings capability in list values, no special chars (diff)
downloadwireguard-openbsd-830e7b7075b18de7727dff85cb1179ee68b16a83.tar.xz
wireguard-openbsd-830e7b7075b18de7727dff85cb1179ee68b16a83.zip
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);
+ }
}
}