]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] don't log when NZF file doesn't exist
authorEvan Hunt <each@isc.org>
Thu, 5 Oct 2017 07:12:14 +0000 (00:12 -0700)
committerEvan Hunt <each@isc.org>
Thu, 5 Oct 2017 07:12:14 +0000 (00:12 -0700)
4755. [cleanup] Silence unnecessary log message when NZF file doesn't
exist. [RT #46186]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index 6205c7c9a80332eabe61150f6c6267bc63f265a0..91dfc2c6727dc3a190fe08a216782f04aaa39c01 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4755.  [cleanup]       Silence unnecessary log message when NZF file doesn't
+                       exist. [RT #46186]
+
 4754.  [bug]           dns_zone_setview needs a two stage commit to properly
                        handle errors. [RT #45841]
 
index d5bf21105f92be82579247e5ad8cdca77dc0e192..5ae183a5ac4159132728ed9de9bdc47768b6aeb0 100644 (file)
@@ -6908,6 +6908,11 @@ static isc_result_t
 count_newzones(dns_view_t *view, ns_cfgctx_t *nzcfg, int *num_zonesp) {
        isc_result_t result;
 
+       if (!isc_file_exists(view->new_zone_file)) {
+               *num_zonesp = 0;
+               return (ISC_R_SUCCESS);
+       }
+
        /*
         * In the case of NZF files, we also parse the configuration in
         * the file at this stage.
@@ -7001,7 +7006,7 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
        int i = 0;
        isc_uint64_t mapsize = 0ULL;
 
-       REQUIRE (config != NULL);
+       REQUIRE(config != NULL);
 
        if (vconfig != NULL)
                voptions = cfg_tuple_get(vconfig, "options");