From: Aram Sargsyan Date: Wed, 13 Apr 2022 13:56:37 +0000 (+0000) Subject: Add a new warning message when processing view configuration X-Git-Tag: v9.19.1~35^2~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dfd5a01eba909d57eef5e3478812c6f9255280e1;p=thirdparty%2Fbind9.git Add a new warning message when processing view configuration 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. --- diff --git a/bin/named/server.c b/bin/named/server.c index 2cb60e46c0e..db8f1d29fb1 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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)