summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2022-01-03 16:42:18 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2022-01-03 16:42:18 +0000
commit586b9857542ab89b1947eae8810d0de558e1685e (patch)
tree73ab63b4fb355adb5620b7c67e1f0c210b2fa565
parent6faa16dd030ebc5a816ac61cfc5de79ea2970b3e (diff)
Prefix life time is independent from router life time.
Form an IPv6 address even if the router announcing the prefix isn't a default router. Problem reported by mgraves AT brainfat.net on misc OK denis
-rw-r--r--sbin/slaacd/engine.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c
index 81a06cc5528..657b86803ed 100644
--- a/sbin/slaacd/engine.c
+++ b/sbin/slaacd/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.74 2021/07/22 15:32:51 kn Exp $ */
+/* $OpenBSD: engine.c,v 1.75 2022/01/03 16:42:17 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -1749,14 +1749,13 @@ void update_iface_ra(struct slaacd_iface *iface, struct radv *ra)
update_iface_ra_dfr(iface, ra);
- if (ra->router_lifetime != 0)
- LIST_FOREACH(prefix, &ra->prefixes, entries) {
- if (!prefix->autonomous || prefix->vltime == 0 ||
- prefix->pltime > prefix->vltime ||
- IN6_IS_ADDR_LINKLOCAL(&prefix->prefix))
- continue;
- update_iface_ra_prefix(iface, ra, prefix);
- }
+ LIST_FOREACH(prefix, &ra->prefixes, entries) {
+ if (!prefix->autonomous || prefix->vltime == 0 ||
+ prefix->pltime > prefix->vltime ||
+ IN6_IS_ADDR_LINKLOCAL(&prefix->prefix))
+ continue;
+ update_iface_ra_prefix(iface, ra, prefix);
+ }
update_iface_ra_rdns(iface, ra);
}