Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rtadvd rtadvd: fix rdnss and dnssl lifetime assignment
details: https://anonhg.NetBSD.org/src/rev/a71a696329d3
branches: trunk
changeset: 451998:a71a696329d3
user: roy <roy%NetBSD.org@localhost>
date: Fri Jun 14 09:06:45 2019 +0000
description:
rtadvd: fix rdnss and dnssl lifetime assignment
Treat it the same as a prefix valid time as per the RFC.
This allows to set a zero value to remove the assignment from the node.
diffstat:
usr.sbin/rtadvd/config.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (31 lines):
diff -r 912ae327d03a -r a71a696329d3 usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c Fri Jun 14 05:59:39 2019 +0000
+++ b/usr.sbin/rtadvd/config.c Fri Jun 14 09:06:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.c,v 1.40 2018/04/20 15:57:23 roy Exp $ */
+/* $NetBSD: config.c,v 1.41 2019/06/14 09:06:45 roy Exp $ */
/* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */
/*
@@ -701,9 +701,7 @@
makeentry(entbuf, sizeof(entbuf), i, "rdnssltime");
MAYHAVE(val64, entbuf, tmp->maxinterval * 3 / 2);
- if (val64 < tmp->maxinterval ||
- val64 > tmp->maxinterval * 2)
- {
+ if (val64 < 0 || val64 > 0xffffffff) {
logit(LOG_ERR, "<%s> %s (%lld) on %s is invalid",
__func__, entbuf, (long long)val64, intface);
goto errexit;
@@ -737,9 +735,7 @@
makeentry(entbuf, sizeof(entbuf), i, "dnsslltime");
MAYHAVE(val64, entbuf, tmp->maxinterval * 3 / 2);
- if (val64 < tmp->maxinterval ||
- val64 > tmp->maxinterval * 2)
- {
+ if (val64 < 0 || val64 > 0xffffffff) {
logit(LOG_ERR, "<%s> %s (%lld) on %s is invalid",
__func__, entbuf, (long long)val64, intface);
goto errexit;
Home |
Main Index |
Thread Index |
Old Index