Make sig-validity-interval a number of days, like the documentation says.

This commit is contained in:
Brian Wellington 2000-12-05 22:19:35 +00:00
parent 09ceae8853
commit ff1db3c6df

View file

@ -33,7 +33,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: confparser.y.dirty,v 1.36 2000/12/02 00:57:43 marka Exp $ */
/* $Id: confparser.y.dirty,v 1.37 2000/12/05 22:19:35 bwelling Exp $ */
#include <config.h>
@ -1423,7 +1423,13 @@ option: /* Empty */
}
| L_SIG_VALIDITY_INTERVAL L_INTEGER
{
tmpres = dns_c_ctx_setsigvalidityinterval(currcfg, $2);
if (int_too_big($2, 60 * 60 * 24)) {
parser_error(ISC_FALSE,
"integer value too big: %u", $2);
YYABORT;
}
tmpres = dns_c_ctx_setsigvalidityinterval(currcfg,
$2 * 60 * 60 * 24);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine sig-validity-interval");
@ -4510,7 +4516,13 @@ view_option: L_FORWARD zone_forward_opt
INSIST(view != NULL);
tmpres = dns_c_view_setsigvalidityinterval(view, $2);
if (int_too_big($2, 60 * 60 * 24)) {
parser_error(ISC_FALSE,
"integer value too big: %u", $2);
YYABORT;
}
tmpres = dns_c_view_setsigvalidityinterval(view,
$2 * 60 * 60 * 24);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine view "
@ -5534,7 +5546,13 @@ zone_option: L_FILE L_QSTRING
INSIST(zone != NULL);
tmpres = dns_c_zone_setsigvalidityinterval(zone, $2);
if (int_too_big($2, 60 * 60 * 24)) {
parser_error(ISC_FALSE,
"integer value too big: %u", $2);
YYABORT;
}
tmpres = dns_c_zone_setsigvalidityinterval(zone,
$2 * 60 * 60 * 24);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine zone "