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-2.0.1~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db3433c1a3adacb4d434ec06f63fc440a5aa29c3;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 624d0f121..75b1843c2 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 {