2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

977. [bug] Improve "not at top of zone" error message.

This commit is contained in:
Mark Andrews
2001-09-04 00:35:19 +00:00
parent 92551304a9
commit bae5d9fcb4
4 changed files with 32 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.122 2001/08/28 03:58:05 marka Exp $ */
/* $Id: master.c,v 1.123 2001/09/04 00:35:17 marka Exp $ */
#include <config.h>
@@ -1396,6 +1396,27 @@ load(dns_loadctx_t *lctx) {
continue;
}
if (type == dns_rdatatype_soa &&
(lctx->options & DNS_MASTER_ZONE) != 0 &&
dns_name_compare(ictx->current, lctx->top) != 0) {
char namebuf[DNS_NAME_FORMATSIZE];
dns_name_format(ictx->current, namebuf,
sizeof(namebuf));
(*callbacks->error)(callbacks,
"dns_master_load: %s:%lu: SOA "
"record not at top of zone (%s)",
source, line, namebuf);
result = DNS_R_NOTZONETOP;
if (MANYERRS(lctx, result)) {
SETRESULT(lctx, result);
read_till_eol = ISC_TRUE;
target = target_ft;
continue;
} else if (result != ISC_R_SUCCESS)
goto insist_and_cleanup;
}
if (type == dns_rdatatype_sig)
covers = dns_rdata_covers(&rdata[rdcount]);
else