]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
catz: improved log message when a zone is overridden
authorTony Finch <dot@dotat.at>
Thu, 29 Nov 2018 14:02:33 +0000 (14:02 +0000)
committerMark Andrews <marka@isc.org>
Mon, 3 Dec 2018 02:32:56 +0000 (21:32 -0500)
If you have a catalog zone containing 10.in-addr.arpa and an
explicitly-configured version which overrides the catz version,
`named` used to log:

catz: error "success" while trying to add zone "10.in-addr.arpa"

After this patch it logs:

catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone

bin/named/server.c

index d90ebb803e17c921a50efe2c2cb430c7cf4514ba..923e25a63bf3d3a3cbef8763bd3bdc2bf4e293bc 100644 (file)
@@ -2551,7 +2551,15 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
                }
 
        } else {
-               if (result != ISC_R_NOTFOUND && result != DNS_R_PARTIALMATCH) {
+               if (result == ISC_R_SUCCESS) {
+                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+                                     "catz: zone \"%s\" is overridden "
+                                     "by explicitly configured zone",
+                                     nameb);
+                       goto cleanup;
+               } else if (result != ISC_R_NOTFOUND &&
+                          result != DNS_R_PARTIALMATCH) {
                        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: error \"%s\" while trying to "