Compare commits

...

1 Commits

Author SHA1 Message Date
Mark Andrews
204ed24f4f Increase the TCP timeout allowance from 1 second to 3
When starting a new TCP query, the initial SRTT estimate
includes time for the kernel to resend SYN if necessary. At
one second, the margin was not always sufficient; this commit
increases it to three.
2021-10-13 22:34:19 -07:00

View File

@@ -1947,12 +1947,12 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
srtt = addrinfo->srtt;
/*
* Allow an additional second for the kernel to resend the SYN
* Allow an additional 3 seconds 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 += US_PER_SEC;
srtt += 3 * US_PER_SEC;
}
/*