]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check options in templates that must be non-zero 12126/head
authorMatthijs Mekking <matthijs@isc.org>
Thu, 28 May 2026 09:51:04 +0000 (11:51 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 28 May 2026 14:25:48 +0000 (14:25 +0000)
Without this, named-checkconf falsely accepts badly configured zones,
and rndc addzone would abort on adding a zone referring to such
templates.

lib/isccfg/check.c

index 26ae9a70b981db7a3a0b59c665da5c303f3f3b5c..be410d77097835f5c8319ebafe113b941fb27e72 100644 (file)
@@ -3525,6 +3525,9 @@ isccfg_check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        if (check_nonzero(zoptions) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
+       if (toptions != NULL && check_nonzero(toptions) != ISC_R_SUCCESS) {
+               result = ISC_R_FAILURE;
+       }
 
        /*
         * Check if a dnssec-policy is set.