summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2015-03-09 18:09:51 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2015-03-09 18:09:51 +0000
commitdee7b549531d4c59233943e1da13b7b41ef32954 (patch)
treef44d3c597ac18402589fda1c954a120a6d6c0989 /sys
parent34fe11188145c9bfe3918f1bc2dd27cc41ba3139 (diff)
Avoid doing IPv6 SLAAC for prefixes with preferred lifetime of zero
RFC 4941 says in 3.3.5: "In particular, an implementation MUST NOT create a temporary address with a zero Preferred Lifetime." OK sthen, henning, benno
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/nd6_rtr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 166c921522d..60e289f8c8f 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.98 2015/02/19 22:24:20 bluhm Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.99 2015/03/09 18:09:50 mikeb Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -1376,12 +1376,13 @@ prelist_update(struct nd_prefix *new, struct nd_defrouter *dr, struct mbuf *m)
}
if ((!autoconf || ((ifp->if_xflags & IFXF_INET6_NOPRIVACY) == 0 &&
- !tempaddr_preferred)) && new->ndpr_vltime != 0 &&
+ !tempaddr_preferred)) &&
+ new->ndpr_vltime != 0 && new->ndpr_pltime != 0 &&
!((ifp->if_xflags & IFXF_INET6_NOPRIVACY) && statique)) {
/*
* There is no SLAAC address and/or there is no preferred RFC
- * 4941 temporary address. And the valid prefix lifetime is
- * non-zero. And there is no static address in the same prefix.
+ * 4941 temporary address. And prefix lifetimes are non-zero.
+ * And there is no static address in the same prefix.
* Create new addresses in process context.
* Increment prefix refcount to ensure the prefix is not
* removed before the task is done.