2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

When retrying with AXFR after a failed IXFR, don't do a SOA query

over TCP before the AXFR request.  Doing so has not been
necessary since zone maintenance using UDP SOA queries was
implemented in zone.c a long time ago.
This commit is contained in:
Andreas Gustafsson 2001-09-27 01:01:46 +00:00
parent 29c9e88c6c
commit 82c168127c

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrin.c,v 1.127 2001/09/12 20:39:36 bwelling Exp $ */
/* $Id: xfrin.c,v 1.128 2001/09/27 01:01:46 gson Exp $ */
#include <config.h>
@ -73,8 +73,6 @@
* when the first two (2) response RRs have already been received.
*/
typedef enum {
XFRST_SOAQUERY,
XFRST_GOTSOA,
XFRST_INITIALSOA,
XFRST_FIRSTDATA,
XFRST_IXFR_DELSOA,
@ -418,31 +416,6 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, isc_uint32_t ttl,
redo:
switch (xfr->state) {
case XFRST_SOAQUERY:
if (rdata->type != dns_rdatatype_soa) {
xfrin_log(xfr, ISC_LOG_ERROR,
"non-SOA response to SOA query");
FAIL(DNS_R_FORMERR);
}
xfr->end_serial = dns_soa_getserial(rdata);
if (!DNS_SERIAL_GT(xfr->end_serial,
xfr->ixfr.request_serial) &&
!dns_zone_isforced(xfr->zone)) {
xfrin_log(xfr, ISC_LOG_DEBUG(3),
"requested serial %u, "
"master has %u, not updating",
xfr->ixfr.request_serial, xfr->end_serial);
FAIL(DNS_R_UPTODATE);
}
xfr->state = XFRST_GOTSOA;
break;
case XFRST_GOTSOA:
/*
* Skip other records in the answer section.
*/
break;
case XFRST_INITIALSOA:
if (rdata->type != dns_rdatatype_soa) {
xfrin_log(xfr, ISC_LOG_ERROR,
@ -1130,8 +1103,8 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
try_axfr:
dns_message_destroy(&msg);
xfrin_reset(xfr);
xfr->reqtype = dns_rdatatype_soa;
xfr->state = XFRST_SOAQUERY;
xfr->reqtype = dns_rdatatype_axfr;
xfr->state = XFRST_INITIALSOA;
xfrin_start(xfr);
return;
}
@ -1233,11 +1206,7 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
dns_message_destroy(&msg);
if (xfr->state == XFRST_GOTSOA) {
xfr->reqtype = dns_rdatatype_axfr;
xfr->state = XFRST_INITIALSOA;
CHECK(xfrin_send_request(xfr));
} else if (xfr->state == XFRST_END) {
if (xfr->state == XFRST_END) {
/*
* Inform the caller we succeeded.
*/