]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
adjust timeout to allow for ECN negotiation failures
authorMark Andrews <marka@isc.org>
Fri, 28 Dec 2018 04:16:04 +0000 (15:16 +1100)
committerEvan Hunt <each@isc.org>
Wed, 16 Jan 2019 01:29:48 +0000 (17:29 -0800)
(cherry picked from commit dadb924be766eb8bfb922eacc8015c33c08d206b)

lib/dns/resolver.c

index dccdc6be961039337a126ba96f36c8d8549dc40b..cbf6b5ca28bd6122fe15b738c85161fd16d32114 100644 (file)
@@ -1883,6 +1883,15 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
 
        srtt = addrinfo->srtt;
 
+       /*
+        * Allow an additional second for the kernel to resend the SYN (or
+        * SYN without ECN in the case of stupid firewalls blocking ECN
+        * negotiation) over the current RTT estimate.
+        */
+       if ((options & DNS_FETCHOPT_TCP) != 0) {
+               srtt += 1000000;
+       }
+
        /*
         * A forwarder needs to make multiple queries. Give it at least
         * a second to do these in.