mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 20:25:55 -04:00
Do not resend TCP requests
The req_response() function is using 'udpcount' variable to resend
the request 'udpcount' times on timeout even for TCP requests,
which does not make sense, as it would use the same connection.
Add a condition to use the resend logic only for UDP requests.
(cherry picked from commit edcdb881da)
This commit is contained in:
parent
14084d8eac
commit
7beda284d2
1 changed files with 3 additions and 1 deletions
|
|
@ -1061,7 +1061,9 @@ req_response(isc_result_t result, isc_region_t *region, void *arg) {
|
|||
|
||||
if (result == ISC_R_TIMEDOUT) {
|
||||
LOCK(&request->requestmgr->locks[request->hash]);
|
||||
if (request->udpcount > 1) {
|
||||
if (request->udpcount > 1 &&
|
||||
(request->flags & DNS_REQUEST_F_TCP) == 0)
|
||||
{
|
||||
request->udpcount -= 1;
|
||||
dns_dispatch_resume(request->dispentry,
|
||||
request->timeout);
|
||||
|
|
|
|||
Loading…
Reference in a new issue