named-checkzone -z ignored the check-wildcard option

Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.
This commit is contained in:
Mark Andrews
2022-11-09 09:50:32 +00:00
parent 0b5a58202e
commit dfc5c1e018
2 changed files with 14 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
6020. [bug] Ensure 'named-checkconf -z' respects the check-wildcard
option when loading a zone. [GL #1905]
6019. [func] Deprecate `coresize`, `datasize`, `files`, and
`stacksize` named.conf options. [GL #3676]

View File

@@ -412,6 +412,17 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options |= DNS_ZONEOPT_CHECKSVCB;
}
obj = NULL;
if (get_maps(maps, "check-wildcard", &obj)) {
if (cfg_obj_asboolean(obj)) {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
} else {
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
}
} else {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
}
obj = NULL;
if (get_checknames(maps, &obj)) {
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {