]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fully sign a thawed zone
authorMatthijs Mekking <matthijs@isc.org>
Fri, 5 Mar 2021 10:27:59 +0000 (11:27 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 17 Mar 2021 07:24:17 +0000 (08:24 +0100)
When thawing a zone, we don't know what changes have been made. If we
do DNSSEC maintenance on this zone, schedule a full sign.

lib/dns/zone.c

index e9766b8e66409251d6c51f0b2b00385a4070ab74..782959b62a54900921e67368dade8dc0a2dd1cc0 100644 (file)
@@ -2404,6 +2404,16 @@ dns_zone_loadandthaw(dns_zone_t *zone) {
        if (inline_raw(zone)) {
                result = zone_load(zone->secure, DNS_ZONELOADFLAG_THAW, false);
        } else {
+               /*
+                * When thawing a zone, we don't know what changes
+                * have been made. If we do DNSSEC maintenance on this
+                * zone, schedule a full sign for this zone.
+                */
+               if (zone->type == dns_zone_master &&
+                   DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_MAINTAIN))
+               {
+                       DNS_ZONEKEY_SETOPTION(zone, DNS_ZONEKEY_FULLSIGN);
+               }
                result = zone_load(zone, DNS_ZONELOADFLAG_THAW, false);
        }