From: Remi Gacogne Date: Mon, 12 Jan 2026 11:34:56 +0000 (+0100) Subject: dnsdist: Insert the proper remote address (proxy protocol, HTTP headers) in the rings X-Git-Tag: rec-5.4.0-beta1~43^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd0b47e79fcb4752fe4e8fdeea4a51b5ec93b905;p=thirdparty%2Fpdns.git dnsdist: Insert the proper remote address (proxy protocol, HTTP headers) in the rings Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-tcp.cc b/pdns/dnsdistdist/dnsdist-tcp.cc index 8f46a963e0..775f4c6644 100644 --- a/pdns/dnsdistdist/dnsdist-tcp.cc +++ b/pdns/dnsdistdist/dnsdist-tcp.cc @@ -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(sentBytes), currentResponse.d_cleartextDH, backendProtocol, true); + ::handleResponseSent(ids, udiff, ids.origRemote, backend->d_config.remote, static_cast(sentBytes), currentResponse.d_cleartextDH, backendProtocol, true); } else { const auto& ids = currentResponse.d_idstate; - ::handleResponseSent(ids, 0, d_ci.remote, ComboAddress(), static_cast(currentResponse.d_buffer.size()), currentResponse.d_cleartextDH, ids.protocol, false); + ::handleResponseSent(ids, 0, ids.origRemote, ComboAddress(), static_cast(currentResponse.d_buffer.size()), currentResponse.d_cleartextDH, ids.protocol, false); } currentResponse.d_buffer.clear();