]> git.ipfire.org Git - thirdparty/bind9.git/commit
Force TCP after repeated UDP timeouts to the same authoritative
authorOndřej Surý <ondrej@isc.org>
Thu, 14 May 2026 09:19:42 +0000 (11:19 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 19 May 2026 09:18:30 +0000 (11:18 +0200)
commit59c00a6f311108a6fe5dcf58a3bea51cc4f9224c
tree4e90e60a604a24b79f9a6630d2297849b7db4623
parent01523a078a848873be90572171124cdd5c1c7b0c
Force TCP after repeated UDP timeouts to the same authoritative

Make the decision in fctx_query() before the dispatch is bound so the
chosen transport and the DNS_FETCHOPT_TCP flag agree.  The previous
location in resquery_send() ran after the UDP dispatch had already been
attached, so the flag flip had no effect on the wire.

Moving the decision earlier also means FCTX_ADDRINFO_NOEDNS0 servers,
previously exempt, now escalate to TCP too.  TCP works regardless of
EDNS state, so this is the intended behaviour.

Assisted-by: Claude:claude-opus-4-7
bin/tests/system/dispatch/ans4/ans.py
bin/tests/system/dispatch/tests_tcponly.py
lib/dns/resolver.c