File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -713,6 +713,9 @@ class HttpTransact
713713 ConnectionAttributes client_info;
714714 ConnectionAttributes parent_info;
715715 ConnectionAttributes server_info;
716+ // This is a copy of the effective client IP address (see pp-clnt) to
717+ // ensure this is available for logging
718+ IpEndpoint effective_client_addr;
716719
717720 Source_t source = Source_t::NONE;
718721 Source_t pre_transform_source = Source_t::NONE;
Original file line number Diff line number Diff line change @@ -448,6 +448,7 @@ HttpSM::attach_client_session(ProxyTransaction *txn)
448448
449449 ats_ip_copy (&t_state.client_info .src_addr , netvc->get_remote_addr ());
450450 ats_ip_copy (&t_state.client_info .dst_addr , netvc->get_local_addr ());
451+ ats_ip_copy (&t_state.effective_client_addr , netvc->get_effective_remote_addr ());
451452 t_state.client_info .is_transparent = netvc->get_is_transparent ();
452453 t_state.client_info .port_attribute = static_cast <HttpProxyPort::TransportType>(netvc->attributes );
453454
Original file line number Diff line number Diff line change @@ -1442,16 +1442,7 @@ LogAccess::marshal_plugin_identity_tag(char *buf)
14421442int
14431443LogAccess::marshal_client_host_ip (char *buf)
14441444{
1445- if (m_http_sm) {
1446- auto txn = m_http_sm->get_ua_txn ();
1447- if (txn) {
1448- sockaddr const *addr = txn->get_client_addr ();
1449- if (addr && ats_is_ip (addr)) {
1450- return marshal_ip (buf, addr);
1451- }
1452- }
1453- }
1454- return INK_MIN_ALIGN;
1445+ return marshal_ip (buf, &m_http_sm->t_state .effective_client_addr .sa );
14551446}
14561447
14571448int
You can’t perform that action at this time.
0 commit comments