mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 19:42:05 -04:00
we didn't catch a zero option at the global level when views are active
This commit is contained in:
parent
29d221ab12
commit
076bda8c2e
2 changed files with 18 additions and 6 deletions
|
|
@ -75,6 +75,15 @@ EOF
|
|||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
[ $? -eq 1 ] || { echo "I: view $field failed" ; ret=1; }
|
||||
cat > badzero.conf << EOF
|
||||
options {
|
||||
$field 0;
|
||||
};
|
||||
view dummy {
|
||||
};
|
||||
EOF
|
||||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
[ $? -eq 1 ] || { echo "I: options + view $field failed" ; ret=1; }
|
||||
cat > badzero.conf << EOF
|
||||
zone dummy {
|
||||
type slave;
|
||||
masters { 0.0.0.0; };
|
||||
|
|
|
|||
|
|
@ -2249,20 +2249,23 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
|
|||
* Check that forwarding is reasonable.
|
||||
*/
|
||||
if (voptions == NULL) {
|
||||
if (options != NULL) {
|
||||
if (options != NULL)
|
||||
if (check_forward(options, NULL,
|
||||
logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
if (check_nonzero(options, logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
}
|
||||
} else {
|
||||
if (check_forward(voptions, NULL, logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
if (check_nonzero(voptions, logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check non-zero options at the global and view levels.
|
||||
*/
|
||||
if (options != NULL && check_nonzero(options, logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
if (voptions != NULL &&check_nonzero(voptions, logctx) != ISC_R_SUCCESS)
|
||||
result = ISC_R_FAILURE;
|
||||
|
||||
/*
|
||||
* Check that dual-stack-servers is reasonable.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue