This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 752d03fa1cfaa1ef188c5deeaa8db737a7bc22bb Author: Brian Neradt <[email protected]> AuthorDate: Mon Jul 20 15:23:54 2026 -0500 Preserve client port in transaction logs (#13379) Client source ports could be logged as zero when the live inbound connection was cleared before transaction log marshalling. This obscured the effective client endpoint in access logs. This reads the port from the effective client endpoint retained by HttpSM, keeping it available after connection cleanup. (cherry picked from commit a92d8babb71c72e1e55f706c795a540be67c496b) --- src/proxy/logging/TransactionLogData.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/proxy/logging/TransactionLogData.cc b/src/proxy/logging/TransactionLogData.cc index 81243496ff..fdaba25fe0 100644 --- a/src/proxy/logging/TransactionLogData.cc +++ b/src/proxy/logging/TransactionLogData.cc @@ -423,10 +423,7 @@ uint16_t TransactionLogData::get_client_port() const { if (likely(m_http_sm != nullptr)) { - if (auto txn = m_http_sm->get_ua_txn(); txn) { - return txn->get_client_port(); - } - return 0; + return m_http_sm->t_state.effective_client_addr.host_order_port(); } return m_non_http_sm_data->m_client_port; }
