]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix the IO reentry guard in outgoing DoH 16082/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 07:35:44 +0000 (09:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 07:35:44 +0000 (09:35 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-nghttp2.cc

index c07ae0a691850e3bae8dadd5fefde4a69d82c331..1e289901f3ecdad75aad3fe9a95657a01021a3c9 100644 (file)
@@ -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 {