From 2bbbbfaeb84b9355b94a95052eba0edf34e3f70b Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 11 Jan 2000 21:21:07 +0000 Subject: [PATCH] warn if SOA RR is unexpectedly missing from a zone --- lib/dns/journal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/dns/journal.c b/lib/dns/journal.c index a285a8f493..c96d397fb9 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -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); }