From: Ondřej Surý Date: Sat, 16 May 2026 11:24:53 +0000 (+0200) Subject: Skip EDNS UDP-size hint on TCP retries X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=08295d004ee9bdfc8fb8e59aa124e7874ae7b23b;p=thirdparty%2Fbind9.git Skip EDNS UDP-size hint on TCP retries The hint feeds the EDNS OPT UDP-size field, which has no effect on TCP transport. Avoid the dns_adb_getudpsize() lookup when the query is already pinned to TCP. Assisted-by: Claude:claude-opus-4-7 --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 0fc89804b80..7095143dd3a 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -2571,7 +2571,9 @@ resquery_send(resquery_t *query) { query->options |= DNS_FETCHOPT_NOEDNS0; } - if (fctx->timeout && (query->options & DNS_FETCHOPT_NOEDNS0) == 0) { + if (fctx->timeout && (query->options & DNS_FETCHOPT_NOEDNS0) == 0 && + (query->options & DNS_FETCHOPT_TCP) == 0) + { isc_sockaddr_t *sockaddr = &query->addrinfo->sockaddr; struct tried *tried = triededns(fctx, sockaddr);