]> 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>
Thu, 17 Nov 2022 00:00:04 +0000 (11:00 +1100)
Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.

(cherry picked from commit dfc5c1e018e1cd1219987fb7d910acbdbb11f035)

CHANGES
bin/check/named-checkconf.c

diff --git a/CHANGES b/CHANGES
index a10c97f58efab164ab33bedc4ade7af84f304881..4786f37a66901f4f9a83ca87bc2c9fdaf3af694c 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]
+
 6017.  [bug]           The view's zone table was not locked when it should
                        have been leading to race conditions when external
                        extensions that manipulate the zone table where in
index 8fcfafa0388c78bcc70bfb5da737bbf7ba550501..9e54d343d921772488d13fa9f7079400494b4c39 100644 (file)
@@ -403,6 +403,17 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
                zone_options |= DNS_ZONEOPT_CHECKSPF;
        }
 
+       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) {