]> 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 14:55:12 +0000 (16:55 +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.

lib/dns/zone.c

index f8c0723ff6bcb4cd26c0d091df28569221809686..ce803abf0bfa98904edd0f2f42fd87d3d4017cc3 100644 (file)
@@ -22498,7 +22498,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));