]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Insert the proper remote address (proxy protocol, HTTP headers) in the rings
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Jan 2026 11:34:56 +0000 (12:34 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Jan 2026 11:34:56 +0000 (12:34 +0100)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-tcp.cc

index 8f46a963e04571580062917fbb2d8eabf7a1157d..775f4c6644eebcf234add981c46ebf88d736efc1 100644 (file)
@@ -258,11 +258,11 @@ void IncomingTCPConnectionState::handleResponseSent(TCPResponse& currentResponse
     if (backendProtocol == dnsdist::Protocol::DoUDP && !currentResponse.d_idstate.forwardedOverUDP) {
       backendProtocol = dnsdist::Protocol::DoTCP;
     }
-    ::handleResponseSent(ids, udiff, d_ci.remote, backend->d_config.remote, static_cast<unsigned int>(sentBytes), currentResponse.d_cleartextDH, backendProtocol, true);
+    ::handleResponseSent(ids, udiff, ids.origRemote, backend->d_config.remote, static_cast<unsigned int>(sentBytes), currentResponse.d_cleartextDH, backendProtocol, true);
   }
   else {
     const auto& ids = currentResponse.d_idstate;
-    ::handleResponseSent(ids, 0, d_ci.remote, ComboAddress(), static_cast<unsigned int>(currentResponse.d_buffer.size()), currentResponse.d_cleartextDH, ids.protocol, false);
+    ::handleResponseSent(ids, 0, ids.origRemote, ComboAddress(), static_cast<unsigned int>(currentResponse.d_buffer.size()), currentResponse.d_cleartextDH, ids.protocol, false);
   }
 
   currentResponse.d_buffer.clear();