From: Andreas Gustafsson Date: Thu, 7 Jun 2001 19:02:00 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.1.3rc2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322b2930b8a19263c417e8ba3ec4e5da8f860f4c;p=thirdparty%2Fbind9.git pullup: 852. [bug] Handle responses from servers which do not now about IXFR. --- diff --git a/CHANGES b/CHANGES index d7ce104063b..b0086f3aaee 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,13 @@ + 860. [func] Drop cross class glue in zone transfers. + 852. [bug] Handle responses from servers which do not + now about IXFR. + 850. [bug] dns_rbt_findnode() would not find nodes that were split on a bitstring label somewhere other than in the last label of the node. [RT #1351] - --- 9.1.3rc1 released --- 831. [bug] The configure script tried to determine diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 1862672d203..e8f113c011d 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: xfrin.c,v 1.109.2.4 2001/06/06 00:11:57 bwelling Exp $ */ +/* $Id: xfrin.c,v 1.109.2.5 2001/06/07 19:02:00 gson Exp $ */ #include @@ -1106,6 +1106,7 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) { FAIL(result); xfrin_log(xfr, ISC_LOG_DEBUG(3), "got %s, retrying with AXFR", isc_result_totext(result)); + try_axfr: dns_message_destroy(&msg); xfrin_reset(xfr); xfr->reqtype = dns_rdatatype_soa; @@ -1114,6 +1115,21 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) { return; } + /* + * Does the server know about IXFR? If it doesn't we will get + * a message with a empty answer section or a potentially a CNAME / + * DNAME, the later is handled by xfr_rr() which will return FORMERR + * if the first RR in the answer section is not a SOA record. + */ + if (xfr->reqtype == dns_rdatatype_ixfr && + xfr->state == XFRST_INITIALSOA && + msg->counts[DNS_SECTION_ANSWER] == 0) { + xfrin_log(xfr, ISC_LOG_DEBUG(3), + "empty answer section, retrying with AXFR"); + goto try_axfr; + } + + result = dns_message_checksig(msg, dns_zone_getview(xfr->zone)); if (result != ISC_R_SUCCESS) { xfrin_log(xfr, ISC_LOG_DEBUG(3), "TSIG check failed: %s",