]> 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 04:57:03 +0000 (15:57 +1100)
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
(cherry picked from commit 16eb35187a90e24a43f51a2c964aaccd0f3813d6)

bin/named/server.c

index f4156266b1cc6eb12f7318779e9e936389580da9..7a00ac629b2011fb4941ba4f3d0006c083f4faa2 100644 (file)
@@ -2194,7 +2194,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(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
+                                     NS_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(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                                      NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: error \"%s\" while trying to "