]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Log rekey failure as error if too many records
authorMatthijs Mekking <matthijs@isc.org>
Mon, 3 Jun 2024 06:00:27 +0000 (08:00 +0200)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Jun 2024 16:51:28 +0000 (18:51 +0200)
By default we log a rekey failure on debug level. We should probably
change the log level to error. We make an exception for when the zone
is not loaded yet, it often happens at startup that a rekey is
run before the zone is fully loaded.

(cherry picked from commit 68b840c731527e01699afaf084559152124b717a)

lib/dns/zone.c

index 3e00c4179d56452048e87c287e7f12e6c45ab931..763be1ec724841511dbc2140a0e0dc60fe61f475 100644 (file)
@@ -22647,7 +22647,11 @@ failure:
                 * Something went wrong; try again in ten minutes or
                 * after a key refresh interval, whichever is shorter.
                 */
-               dnssec_log(zone, ISC_LOG_DEBUG(3),
+               int loglevel = ISC_LOG_DEBUG(3);
+               if (result != DNS_R_NOTLOADED) {
+                       loglevel = ISC_LOG_ERROR;
+               }
+               dnssec_log(zone, loglevel,
                           "zone_rekey failure: %s (retry in %u seconds)",
                           isc_result_totext(result),
                           ISC_MIN(zone->refreshkeyinterval, 600));