2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +00:00

Add flag to named-checkconf to ignore "not configured" errors

named-checkconf now takes "-n" to ignore "not configured" errors.
This allows named-checkconf to check the syntax of configurations
from other builds which have support for more options.
This commit is contained in:
Mark Andrews
2024-09-02 16:03:17 +10:00
parent 004a5329e2
commit 61faffd06f
4 changed files with 18 additions and 3 deletions

View File

@@ -2341,7 +2341,9 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
clause->name);
CHECK(ISC_R_FAILURE);
}
if ((clause->flags & CFG_CLAUSEFLAG_NOTCONFIGURED) != 0) {
if ((pctx->flags & CFG_PCTX_ALLCONFIGS) == 0 &&
(clause->flags & CFG_CLAUSEFLAG_NOTCONFIGURED) != 0)
{
cfg_parser_error(pctx, 0,
"option '%s' was not "
"enabled at compile time",