From 16eb35187a90e24a43f51a2c964aaccd0f3813d6 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Thu, 29 Nov 2018 14:02:33 +0000 Subject: [PATCH] catz: improved log message when a zone is overridden 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/named/server.c b/bin/named/server.c index d90ebb803e..923e25a63b 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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 "