UNLOCK(&zone->lock);
}
+bool
+dns_zone_israw(dns_zone_t *zone) {
+ bool israw;
+ REQUIRE(DNS_ZONE_VALID(zone));
+ LOCK(&zone->lock);
+ israw = zone->secure != NULL;
+ UNLOCK(&zone->lock);
+ return (israw);
+}
+
+bool
+dns_zone_issecure(dns_zone_t *zone) {
+ bool issecure;
+ REQUIRE(DNS_ZONE_VALID(zone));
+ LOCK(&zone->lock);
+ issecure = zone->raw != NULL;
+ UNLOCK(&zone->lock);
+ return (issecure);
+}
+
struct keydone {
bool all;
unsigned char data[5];
dns_ttl_t maxttl = 0;
uint32_t maxrecords;
uint64_t records;
+ bool is_inline, is_maintain, is_signing;
dns_diff_init(mctx, &diff);
dns_diff_init(mctx, &temp);
dns_zone_getssutable(zone, &ssutable);
options = dns_zone_getoptions(zone);
+ is_inline = (!dns_zone_israw(zone) && dns_zone_issecure(zone));
+ is_maintain = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN) != 0);
+ is_signing = is_inline || (!is_inline && is_maintain);
+
/*
* Get old and new versions now that queryacl has been checked.
*/
goto failure;
}
}
- if (!ISC_LIST_EMPTY(diff.tuples)) {
+ if (!ISC_LIST_EMPTY(diff.tuples) && is_signing) {
result = dns_zone_cdscheck(zone, db, ver);
if (result == DNS_R_BADCDS || result == DNS_R_BADCDNSKEY) {
update_log(client, zone, LOGLEVEL_PROTOCOL,
CHECK(rollback_private(db, privatetype, ver, &diff));
- CHECK(add_signing_records(db, privatetype, ver, &diff));
+ if (is_signing) {
+ CHECK(add_signing_records(db, privatetype, ver, &diff));
+ }
CHECK(add_nsec3param_records(client, zone, db, ver, &diff));
- if (had_dnskey && !has_dnskey) {
+ if (is_signing && had_dnskey && !has_dnskey) {
/*
* We are transitioning from secure to insecure.
* Cause all NSEC3 chains to be deleted. When the