]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
named-checkzone -z ignored the check-wildcard option
authorMark Andrews <marka@isc.org>
Wed, 9 Nov 2022 09:50:32 +0000 (09:50 +0000)
committerMark Andrews <marka@isc.org>
Wed, 16 Nov 2022 22:35:00 +0000 (09:35 +1100)
Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.

CHANGES
bin/check/named-checkconf.c

diff --git a/CHANGES b/CHANGES
index ffd0ecefae3f530d431fc16bf528c758f363b4bc..a24986339e34a295d0bcc34f362d4661b05f3513 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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]
 
index a95bddbea7a0907708721bbd8c5b4005c3cc101e..cb844f2bea950a3531ed686f4b4280412c79bec3 100644 (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) {