From: Remi Gacogne Date: Tue, 26 Aug 2025 12:42:38 +0000 (+0200) Subject: dnsdist: Fix a caching bug when all servers are down and the query was received over TCP X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ebc5ce098bb84de81ab6560c5ec2b5bb28d5ed6;p=thirdparty%2Fpdns.git dnsdist: Fix a caching bug when all servers are down and the query was received over TCP Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist.cc b/pdns/dnsdistdist/dnsdist.cc index 47c5c42ff5..1485f11d13 100644 --- a/pdns/dnsdistdist/dnsdist.cc +++ b/pdns/dnsdistdist/dnsdist.cc @@ -1451,8 +1451,8 @@ ProcessQueryResult processQueryAfterRules(DNSQuestion& dnsQuestion, std::shared_ if (selectedBackend && selectedBackend->isTCPOnly()) { willBeForwardedOverUDP = false; } - else if (!selectedBackend) { - willBeForwardedOverUDP = !serverPool.isTCPOnly(); + else if (!selectedBackend && serverPool.isTCPOnly()) { + willBeForwardedOverUDP = false; } uint32_t allowExpired = 0;