* do this because other connections could be using a different
* certificate, so we just create a new dispatch every time.
*/
- if (xfr->transport == NULL ||
- dns_transport_get_type(xfr->transport) == DNS_TRANSPORT_TCP)
+ if (xfr->disp == NULL &&
+ (xfr->transport == NULL ||
+ dns_transport_get_type(xfr->transport) == DNS_TRANSPORT_TCP))
{
dns_dispatchmgr_t *dispmgr = dns_view_getdispatchmgr(xfr->view);
if (dispmgr == NULL) {
isc_sockaddr_format(&xfr->primaryaddr, peer, sizeof(peer));
xfrin_log(xfr, ISC_LOG_DEBUG(1),
"attached to TCP connection to %s", peer);
- } else {
+ } else if (xfr->disp == NULL) {
dns_dispatchmgr_t *dispmgr = dns_view_getdispatchmgr(xfr->view);
if (dispmgr == NULL) {
result = ISC_R_SHUTTINGDOWN;
CHECK(result);
}
+ /* If this is a retry, we need to cancel the previous dispentry */
+ if (xfr->dispentry != NULL) {
+ dns_dispatch_done(&xfr->dispentry);
+ }
+
LIBDNS_XFRIN_START(xfr, xfr->info);
/*
case XFRST_GOTSOA:
xfr->reqtype = dns_rdatatype_axfr;
atomic_store(&xfr->state, XFRST_ZONEXFRREQUEST);
- CHECK(xfrin_send_request(xfr));
+ CHECK(xfrin_start(xfr));
break;
case XFRST_AXFR_END:
case XFRST_IXFR_END: