2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

deleting the last NS should always succeed when not at the zone apex

This commit is contained in:
Andreas Gustafsson 1999-11-19 19:07:16 +00:00
parent 6eccd75f1f
commit 1a3d6530f6

View File

@ -2188,20 +2188,29 @@ update_action(isc_task_t *task, isc_event_t *event)
&diff)); &diff));
} }
} else if (update_class == dns_rdataclass_none) { } else if (update_class == dns_rdataclass_none) {
if (rdata.type == dns_rdatatype_soa) { /*
isc_log_write(UPDATE_PROTOCOL_LOGARGS, * The (name == zonename) condition appears in
"attempt to delete SOA ignored"); * RFC2136 3.4.2.4 but is missing from the pseudocode.
continue; */
} if (dns_name_equal(name, zonename)) {
if (rdata.type == dns_rdatatype_ns) { if (rdata.type == dns_rdatatype_soa) {
int count;
CHECK(rr_count(db, ver, name,
dns_rdatatype_ns, 0, &count));
if (count == 1) {
isc_log_write(UPDATE_PROTOCOL_LOGARGS, isc_log_write(UPDATE_PROTOCOL_LOGARGS,
"attempt to delete SOA "
"ignored");
continue;
}
if (rdata.type == dns_rdatatype_ns) {
int count;
CHECK(rr_count(db, ver, name,
dns_rdatatype_ns,
0, &count));
if (count == 1) {
isc_log_write(
UPDATE_PROTOCOL_LOGARGS,
"attempt to delete last " "attempt to delete last "
"NS ignored"); "NS ignored");
continue; continue;
}
} }
} }
isc_log_write(UPDATE_PROTOCOL_LOGARGS, isc_log_write(UPDATE_PROTOCOL_LOGARGS,