]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a new warning message when processing view configuration
authorAram Sargsyan <aram@isc.org>
Wed, 13 Apr 2022 13:56:37 +0000 (13:56 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 28 Apr 2022 12:37:30 +0000 (12:37 +0000)
When parsing the configuration file, log a warning message in
configure_view() function when encountering a `catalog-zones`
option in a view with non-IN rdata class.

bin/named/server.c

index 2cb60e46c0eb37480e07236f85537e70470948b2..db8f1d29fb1ada34717e85f9c3aa2b8a8b92286e 100644 (file)
@@ -4132,6 +4132,15 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                rpz_configured = true;
        }
 
+       obj = NULL;
+       if (view->rdclass != dns_rdataclass_in && need_hints &&
+           named_config_get(maps, "catalog-zones", &obj) == ISC_R_SUCCESS)
+       {
+               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                           "'catalog-zones' option is only supported "
+                           "for views with class IN");
+       }
+
        obj = NULL;
        if (view->rdclass == dns_rdataclass_in && need_hints &&
            named_config_get(maps, "catalog-zones", &obj) == ISC_R_SUCCESS)