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:
parent
559b10cc8f
commit
2bbbbfaeb8
@ -176,7 +176,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
|
|||||||
node = NULL;
|
node = NULL;
|
||||||
result = dns_db_findnode(db, zonename, ISC_FALSE, &node);
|
result = dns_db_findnode(db, zonename, ISC_FALSE, &node);
|
||||||
if (result != DNS_R_SUCCESS)
|
if (result != DNS_R_SUCCESS)
|
||||||
return (result);
|
goto nonode;
|
||||||
|
|
||||||
dns_rdataset_init(&rdataset);
|
dns_rdataset_init(&rdataset);
|
||||||
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_soa, 0,
|
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);
|
&rdata, tp);
|
||||||
|
|
||||||
dns_rdataset_disassociate(&rdataset);
|
dns_rdataset_disassociate(&rdataset);
|
||||||
|
return (ISC_R_SUCCESS);
|
||||||
|
|
||||||
freenode:
|
freenode:
|
||||||
dns_db_detachnode(db, &node);
|
dns_db_detachnode(db, &node);
|
||||||
|
nonode:
|
||||||
|
UNEXPECTED_ERROR(__FILE__, __LINE__, "missing SOA");
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user