mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-03 13:59:27 -04:00
Merge branch '1807-checkconf-error' into 'master'
named-checkconf -z could exit with an incorrect status Closes #1807 See merge request isc-projects/bind9!3468
This commit is contained in:
commit
a6e6d0c1d5
4 changed files with 41 additions and 1 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
5404. [bug] 'named-checkconf -z' could incorrectly indicate
|
||||
success if errors were found in one view but not in a
|
||||
subsequent one. [GL #1807]
|
||||
|
||||
5403. [func] Don't set udp recv/send buffer sizes, sockets will
|
||||
use system defaults. [GL #1713]
|
||||
|
||||
|
|
|
|||
|
|
@ -530,7 +530,12 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
|||
}
|
||||
|
||||
classobj = cfg_tuple_get(vconfig, "class");
|
||||
CHECK(config_getclass(classobj, dns_rdataclass_in, &viewclass));
|
||||
tresult = config_getclass(classobj, dns_rdataclass_in,
|
||||
&viewclass);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
CHECK(tresult);
|
||||
}
|
||||
|
||||
if (dns_rdataclass_ismeta(viewclass)) {
|
||||
CHECK(ISC_R_FAILURE);
|
||||
}
|
||||
|
|
|
|||
24
bin/tests/system/checkconf/check-missing-zone.conf
Normal file
24
bin/tests/system/checkconf/check-missing-zone.conf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
view missing {
|
||||
zone missing.example {
|
||||
type master;
|
||||
file "missing.example.db";
|
||||
};
|
||||
};
|
||||
|
||||
view good {
|
||||
zone shared.example {
|
||||
type master;
|
||||
file "shared.example.db";
|
||||
};
|
||||
};
|
||||
|
|
@ -364,6 +364,13 @@ grep "zone shared.example/IN: loaded serial" < checkconf.out$n > /dev/null || re
|
|||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf -z returns error when a later view is okay ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-missing-zone.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf prints max-cache-size <percentage> correctly ($n)"
|
||||
ret=0
|
||||
|
|
|
|||
Loading…
Reference in a new issue