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-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F16082%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix the IO reentry guard in outgoing DoH Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-nghttp2.cc b/pdns/dnsdistdist/dnsdist-nghttp2.cc index c07ae0a69..1e289901f 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2.cc @@ -376,6 +376,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 {