]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix the IO reentry guard in outgoing DoH 16097/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 07:35:44 +0000 (09:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Sep 2025 13:54:16 +0000 (15:54 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 81f0706bdf91c01ee26f8bb18315206af7a70b31)

pdns/dnsdistdist/dnsdist-nghttp2.cc

index 64e0827ec3b5ef37db10cdb03ce8767767a5e050..f1beb46119fa85d0e0c368090282bf50e685d884 100644 (file)
@@ -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 {