2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

warn if SOA RR is unexpectedly missing from a zone

This commit is contained in:
Andreas Gustafsson 2000-01-11 21:21:07 +00:00
parent 559b10cc8f
commit 2bbbbfaeb8

View File

@ -176,7 +176,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
node = NULL;
result = dns_db_findnode(db, zonename, ISC_FALSE, &node);
if (result != DNS_R_SUCCESS)
return (result);
goto nonode;
dns_rdataset_init(&rdataset);
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_soa, 0,
@ -194,9 +194,12 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
&rdata, tp);
dns_rdataset_disassociate(&rdataset);
return (ISC_R_SUCCESS);
freenode:
dns_db_detachnode(db, &node);
nonode:
UNEXPECTED_ERROR(__FILE__, __LINE__, "missing SOA");
return (result);
}