From a25310fd1dce652cdebba2b3dbc5d38cc3706745 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 7 Apr 2000 19:41:07 +0000 Subject: [PATCH] if the first RR in an incoming zone transfer was not an SOA, we got an assertion failure --- CHANGES | 4 ++++ lib/dns/xfrin.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6403dc4607..fd265575d9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + 37. [bug] If the first RR in an incoming zone transfer was + not an SOA, the server died with an assertion failure + instead of just reporting an error. + 36. [cleanup] Change DNS_R_SUCCESS (and others) to ISC_R_SUCCESS 35. [performance] Log messages which are of a level too high to be diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index f1ab2da784..1704f11357 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: xfrin.c,v 1.59 2000/04/06 22:02:32 explorer Exp $ */ +/* $Id: xfrin.c,v 1.60 2000/04/07 19:38:50 gson Exp $ */ #include @@ -405,7 +405,11 @@ xfr_rr(dns_xfrin_ctx_t *xfr, break; case XFRST_INITIALSOA: - INSIST(rdata->type == dns_rdatatype_soa); + if (rdata->type != dns_rdatatype_soa) { + xfrin_log(xfr, ISC_LOG_ERROR, + "first RR in zone transfer must be SOA"); + FAIL(DNS_R_FORMERR); + } /* * Remember the serial number in the intial SOA. * We need it to recognize the end of an IXFR.