From: Remi Gacogne Date: Fri, 5 Sep 2025 07:35:44 +0000 (+0200) Subject: dnsdist: Fix the IO reentry guard in outgoing DoH X-Git-Tag: dnsdist-1.9.11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28ab841bdd5c112457464320c036e5b85b176d98;p=thirdparty%2Fpdns.git dnsdist: Fix the IO reentry guard in outgoing DoH Signed-off-by: Remi Gacogne (cherry picked from commit 81f0706bdf91c01ee26f8bb18315206af7a70b31) --- diff --git a/pdns/dnsdistdist/dnsdist-nghttp2.cc b/pdns/dnsdistdist/dnsdist-nghttp2.cc index 64e0827ec..f1beb4611 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2.cc @@ -371,6 +371,10 @@ void DoHConnectionToBackend::handleReadableIOCallback(int fd, FDMultiplexer::fun throw std::runtime_error("Unexpected socket descriptor " + std::to_string(fd) + " received in " + std::string(__PRETTY_FUNCTION__) + ", expected " + std::to_string(conn->getHandle())); } + if (conn->d_inIOCallback) { + return; + } + conn->d_inIOCallback = true; dnsdist::tcp::HandlingIOGuard handlingIOGuard(conn->d_inIOCallback); IOStateGuard ioGuard(conn->d_ioState); do {