Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/proxy/http/HttpTransact.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,9 @@ class HttpTransact
ConnectionAttributes client_info;
ConnectionAttributes parent_info;
ConnectionAttributes server_info;
// This is a copy of the effective client IP address (see pp-clnt) to
// ensure this is available for logging
IpEndpoint effective_client_addr;

Source_t source = Source_t::NONE;
Source_t pre_transform_source = Source_t::NONE;
Expand Down
1 change: 1 addition & 0 deletions src/proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ HttpSM::attach_client_session(ProxyTransaction *txn)

ats_ip_copy(&t_state.client_info.src_addr, netvc->get_remote_addr());
ats_ip_copy(&t_state.client_info.dst_addr, netvc->get_local_addr());
ats_ip_copy(&t_state.effective_client_addr, netvc->get_effective_remote_addr());
t_state.client_info.is_transparent = netvc->get_is_transparent();
t_state.client_info.port_attribute = static_cast<HttpProxyPort::TransportType>(netvc->attributes);

Expand Down
11 changes: 1 addition & 10 deletions src/proxy/logging/LogAccess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1442,16 +1442,7 @@ LogAccess::marshal_plugin_identity_tag(char *buf)
int
LogAccess::marshal_client_host_ip(char *buf)
{
if (m_http_sm) {
auto txn = m_http_sm->get_ua_txn();
if (txn) {
sockaddr const *addr = txn->get_client_addr();
if (addr && ats_is_ip(addr)) {
return marshal_ip(buf, addr);
}
}
}
return INK_MIN_ALIGN;
return marshal_ip(buf, &m_http_sm->t_state.effective_client_addr.sa);
}

int
Expand Down