Module Name: src Committed By: roy Date: Fri Jun 14 09:06:45 UTC 2019
Modified Files: src/usr.sbin/rtadvd: config.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rtadvd/config.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.40 src/usr.sbin/rtadvd/config.c:1.41 --- src/usr.sbin/rtadvd/config.c:1.40 Fri Apr 20 15:57:23 2018 +++ src/usr.sbin/rtadvd/config.c Fri Jun 14 09:06:45 2019 @@ -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 @@ getconfig(const char *intface, int exith 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 @@ getconfig(const char *intface, int exith 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;