From 0fbdf189c7c51a5fe898faae4d6d71a5f2dc9979 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 1 Apr 2021 15:22:55 +1100 Subject: [PATCH] Rewrite managed-key journal immediately Both managed keys and regular zone journals need to be updated immediately when a recoverable error is discovered. --- lib/dns/zone.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index c9bca4bd94..5f042f4f63 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -5209,16 +5209,14 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, result = ISC_R_SUCCESS; if (needdump) { - if (zone->type == dns_zone_key) { + if (fixjournal) { + DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_FIXJOURNAL); + zone_journal_compact(zone, zone->db, 0); + zone_needdump(zone, 0); + } else if (zone->type == dns_zone_key) { zone_needdump(zone, 30); } else { - if (fixjournal) { - DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_FIXJOURNAL); - zone_journal_compact(zone, zone->db, 0); - zone_needdump(zone, 0); - } else { - zone_needdump(zone, DNS_DUMP_DELAY); - } + zone_needdump(zone, DNS_DUMP_DELAY); } }