You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2026/07/06 20:08:43 UTC

(trafficserver) branch 10.2.x updated (bf218ea66a -> f28ec6386a)

This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a change to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


    from bf218ea66a Add per-plugin workload counters (#13278)
     new e09d13bc82 traffic_crashlog: emit a well-formed report when the backtrace is empty (#13360)
     new eabd09017b Cleanup: remove unused functions related connect attempts (#13357)
     new e49a116659 USDT: normalize names for STATE_ENTER (#13346)
     new 13e13b3670 Fix Proxy-Protocol log field symbols (#13345)
     new eb87119894 curl 8.20 test update: curl PROXY destination changes (#13239)
     new a63417f33d Throttle OCSP cert-status error instead of logging on every handshake (#13312)
     new f28ec6386a Expand client IP debug logging test coverage (#13290)

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 include/proxy/http/HttpTransact.h                  |   3 -
 src/iocore/net/OCSPStapling.cc                     |   2 +-
 src/proxy/http/HttpSM.cc                           |  84 ++++++-------
 src/proxy/http/HttpTransact.cc                     |  22 ----
 src/proxy/logging/Log.cc                           |   4 +-
 src/traffic_crashlog/traffic_crashlog.cc           |   8 +-
 tests/gold_tests/autest-site/ats_replay.test.ext   |  33 +++--
 .../gold_tests/logging/log-debug-client-ip.test.py |  39 ++----
 .../replay/log-debug-client-ip-http.replay.yaml    | 129 +++++++++++++++++++
 .../replay/log-debug-client-ip-http2.replay.yaml   | 134 ++++++++++++++++++++
 .../replay/log-debug-client-ip-http3.replay.yaml   | 136 +++++++++++++++++++++
 .../replay/log-debug-client-ip-https.replay.yaml   | 134 ++++++++++++++++++++
 .../pluginTest/tsapi/test_TSVConnPPInfo.test.py    |  13 +-
 13 files changed, 621 insertions(+), 120 deletions(-)
 create mode 100644 tests/gold_tests/logging/replay/log-debug-client-ip-http.replay.yaml
 create mode 100644 tests/gold_tests/logging/replay/log-debug-client-ip-http2.replay.yaml
 create mode 100644 tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml
 create mode 100644 tests/gold_tests/logging/replay/log-debug-client-ip-https.replay.yaml


(trafficserver) 03/07: USDT: normalize names for STATE_ENTER (#13346)

Posted by cm...@apache.org.
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 e49a116659d2fb0abc1e12c73125eca3414e1d22
Author: Mo Chen <mo...@apache.org>
AuthorDate: Mon Jun 29 08:11:50 2026 -0500

    USDT: normalize names for STATE_ENTER (#13346)
    
    (cherry picked from commit 8ef57470b86942dbf3641b75ff48d20d10a9f07a)
---
 src/proxy/http/HttpSM.cc | 84 ++++++++++++++++++++++++------------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index 749e271c1f..ae90df580f 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -228,7 +228,7 @@ initialize_thread_for_connecting_pools(EThread *thread)
   {                                                                                      \
     /*ink_assert (magic == HttpSmMagic_t::ALIVE); */ REMEMBER(event, reentrancy_count);  \
     SMDbg(dbg_ctl_http, "[%s, %s]", #state_name, HttpDebugNames::get_event_name(event)); \
-    ATS_PROBE1(state_name, sm_id);                                                       \
+    ATS_PROBE1(state_enter_##state_name, sm_id);                                         \
   }
 
 #define HTTP_SM_SET_DEFAULT_HANDLER(_h)   \
@@ -576,7 +576,7 @@ HttpSM::setup_blind_tunnel_port()
 int
 HttpSM::state_read_client_request_header(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_read_client_request_header, event);
+  STATE_ENTER(state_read_client_request_header, event);
 
   ink_assert(_ua.get_entry()->read_vio == (VIO *)data);
   ink_assert(server_entry == nullptr);
@@ -898,7 +898,7 @@ HttpSM::wait_for_full_body()
 int
 HttpSM::state_watch_for_client_abort(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_watch_for_client_abort, event);
+  STATE_ENTER(state_watch_for_client_abort, event);
 
   ink_assert(_ua.get_entry()->read_vio == (VIO *)data || _ua.get_entry()->write_vio == (VIO *)data);
   ink_assert(_ua.get_entry()->vc == _ua.get_txn());
@@ -1042,7 +1042,7 @@ HttpSM::setup_push_read_response_header()
 int
 HttpSM::state_read_push_response_header(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_read_push_response_header, event);
+  STATE_ENTER(state_read_push_response_header, event);
   ink_assert(_ua.get_entry()->read_vio == (VIO *)data);
   ink_assert(t_state.current.server == nullptr);
 
@@ -1138,7 +1138,7 @@ HttpSM::state_read_push_response_header(int event, void *data)
 int
 HttpSM::state_raw_http_server_open(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_raw_http_server_open, event);
+  STATE_ENTER(state_raw_http_server_open, event);
   ink_assert(server_entry == nullptr);
   ATS_PROBE1(milestone_server_connect_end, sm_id);
   milestones[TS_MILESTONE_SERVER_CONNECT_END] = ink_get_hrtime();
@@ -1204,7 +1204,7 @@ HttpSM::state_raw_http_server_open(int event, void *data)
 int
 HttpSM::state_request_wait_for_transform_read(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_request_wait_for_transform_read, event);
+  STATE_ENTER(state_request_wait_for_transform_read, event);
   int64_t size;
 
   switch (event) {
@@ -1244,7 +1244,7 @@ HttpSM::state_request_wait_for_transform_read(int event, void *data)
 int
 HttpSM::state_response_wait_for_transform_read(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_response_wait_for_transform_read, event);
+  STATE_ENTER(state_response_wait_for_transform_read, event);
   int64_t size = *(static_cast<int64_t *>(data));
 
   switch (event) {
@@ -1274,7 +1274,7 @@ HttpSM::state_response_wait_for_transform_read(int event, void *data)
 int
 HttpSM::state_common_wait_for_transform_read(HttpTransformInfo *t_info, HttpSMHandler tunnel_handler, int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_common_wait_for_transform_read, event);
+  STATE_ENTER(state_common_wait_for_transform_read, event);
   HttpTunnelConsumer *c = nullptr;
 
   switch (event) {
@@ -1374,7 +1374,7 @@ HttpSM::state_api_callback(int event, void *data)
 
   this->milestone_update_api_time();
 
-  STATE_ENTER(&HttpSM::state_api_callback, event);
+  STATE_ENTER(state_api_callback, event);
 
   state_api_callout(event, data);
 
@@ -1414,7 +1414,7 @@ HttpSM::state_api_callout(int event, void * /* data ATS_UNUSED */)
   AfterApiReturn_t api_next = AfterApiReturn_t::UNKNOWN;
 
   if (event != EVENT_NONE) {
-    STATE_ENTER(&HttpSM::state_api_callout, event);
+    STATE_ENTER(state_api_callout, event);
   }
 
   if (api_timer < 0) {
@@ -1846,7 +1846,7 @@ int
 HttpSM::state_http_server_open(int event, void *data)
 {
   SMDbg(dbg_ctl_http_track, "entered inside state_http_server_open: %s", HttpDebugNames::get_event_name(event));
-  STATE_ENTER(&HttpSM::state_http_server_open, event);
+  STATE_ENTER(state_http_server_open, event);
 
   if (event == CONNECT_EVENT_RETRY) {
     pending_action.clear_if_action_is(reinterpret_cast<Action *>(data));
@@ -2007,7 +2007,7 @@ HttpSM::state_http_server_open(int event, void *data)
 int
 HttpSM::state_read_server_response_header(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_read_server_response_header, event);
+  STATE_ENTER(state_read_server_response_header, event);
   // If we had already received EOS, just go away. We would sometimes see
   // a WRITE event appear after receiving EOS from the server connection
   if (server_entry->eos) {
@@ -2199,7 +2199,7 @@ HttpSM::state_send_server_request_header(int event, void *data)
   ink_assert(server_entry != nullptr);
   ink_assert(server_entry->eos == false);
   ink_assert(server_entry->write_vio == (VIO *)data);
-  STATE_ENTER(&HttpSM::state_send_server_request_header, event);
+  STATE_ENTER(state_send_server_request_header, event);
 
   int method;
 
@@ -2461,7 +2461,7 @@ HttpSM::process_hostdb_info(HostDBRecord *record)
 int
 HttpSM::state_hostdb_lookup(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_hostdb_lookup, event);
+  STATE_ENTER(state_hostdb_lookup, event);
 
   switch (event) {
   case EVENT_HOST_DB_LOOKUP:
@@ -2499,7 +2499,7 @@ HttpSM::state_hostdb_lookup(int event, void *data)
 int
 HttpSM::state_hostdb_reverse_lookup(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_hostdb_reverse_lookup, event);
+  STATE_ENTER(state_hostdb_reverse_lookup, event);
 
   // HttpRequestFlavor_t::SCHEDULED_UPDATE can be transformed into
   // HttpRequestFlavor_t::REVPROXY
@@ -2533,7 +2533,7 @@ HttpSM::state_hostdb_reverse_lookup(int event, void *data)
 int
 HttpSM::state_cache_open_write(int event, void *data)
 {
-  STATE_ENTER(&HttpSM : state_cache_open_write, event);
+  STATE_ENTER(state_cache_open_write, event);
 
   // Make sure we are on the "right" thread
   if (_ua.get_txn()) {
@@ -2658,7 +2658,7 @@ HttpSM::setup_cache_lookup_complete_api()
 int
 HttpSM::state_cache_open_read(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::state_cache_open_read, event);
+  STATE_ENTER(state_cache_open_read, event);
 
   pending_action.clear_if_action_is(reinterpret_cast<Action *>(data));
 
@@ -2901,7 +2901,7 @@ HttpSM::tunnel_handler_post_or_put(HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_post(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_post, event);
+  STATE_ENTER(tunnel_handler_post, event);
 
   HttpTunnelProducer *p =
     _ua.get_txn() != nullptr ? tunnel.get_producer(_ua.get_txn()) : tunnel.get_producer(HttpTunnelType_t::HTTP_CLIENT);
@@ -3016,7 +3016,7 @@ HttpSM::setup_tunnel_handler_trailer(HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_trailer(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_trailer, event);
+  STATE_ENTER(tunnel_handler_trailer, event);
 
   switch (event) {
   case HTTP_TUNNEL_EVENT_DONE: // Response tunnel done.
@@ -3062,7 +3062,7 @@ HttpSM::tunnel_handler_trailer(int event, void *data)
 int
 HttpSM::tunnel_handler_cache_fill(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_cache_fill, event);
+  STATE_ENTER(tunnel_handler_cache_fill, event);
 
   ink_assert(event == HTTP_TUNNEL_EVENT_DONE);
   ink_assert(data == &tunnel);
@@ -3103,7 +3103,7 @@ HttpSM::tunnel_handler_cache_fill(int event, void *data)
 int
 HttpSM::tunnel_handler_100_continue(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_100_continue, event);
+  STATE_ENTER(tunnel_handler_100_continue, event);
 
   ink_assert(event == HTTP_TUNNEL_EVENT_DONE);
   ink_assert(data == &tunnel);
@@ -3144,7 +3144,7 @@ HttpSM::tunnel_handler_100_continue(int event, void *data)
 int
 HttpSM::tunnel_handler_push(int event, void *data)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_push, event);
+  STATE_ENTER(tunnel_handler_push, event);
 
   ink_assert(event == HTTP_TUNNEL_EVENT_DONE);
   ink_assert(data == &tunnel);
@@ -3182,7 +3182,7 @@ HttpSM::tunnel_handler_push(int event, void *data)
 int
 HttpSM::tunnel_handler(int event, void * /* data ATS_UNUSED */)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler, event);
+  STATE_ENTER(tunnel_handler, event);
 
   // If we had already received EOS, just go away. We would sometimes see
   // a WRITE event appear after receiving EOS from the server connection
@@ -3240,7 +3240,7 @@ HttpSM::is_http_server_eos_truncation(HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_server(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_server, event);
+  STATE_ENTER(tunnel_handler_server, event);
 
   // An intercept handler may not set TS_MILESTONE_SERVER_CONNECT
   // by default. Therefore we only set TS_MILESTONE_SERVER_CLOSE if
@@ -3445,7 +3445,7 @@ HttpSM::tunnel_handler_server(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_trailer_server(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_trailer_server, event);
+  STATE_ENTER(tunnel_handler_trailer_server, event);
 
   switch (event) {
   case VC_EVENT_INACTIVITY_TIMEOUT:
@@ -3529,7 +3529,7 @@ HttpSM::tunnel_handler_trailer_server(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_100_continue_ua(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_100_continue_ua, event);
+  STATE_ENTER(tunnel_handler_100_continue_ua, event);
 
   ink_assert(c->vc == _ua.get_txn());
 
@@ -3616,7 +3616,7 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer *c)
   HttpTunnelProducer *p                = nullptr;
   HttpTunnelConsumer *selfc            = nullptr;
 
-  STATE_ENTER(&HttpSM::tunnel_handler_ua, event);
+  STATE_ENTER(tunnel_handler_ua, event);
   ink_assert(c->vc == _ua.get_txn());
   ATS_PROBE1(milestone_ua_close, sm_id);
   milestones[TS_MILESTONE_UA_CLOSE] = ink_get_hrtime();
@@ -3752,7 +3752,7 @@ HttpSM::tunnel_handler_trailer_ua(int event, HttpTunnelConsumer *c)
   HttpTunnelProducer *p     = nullptr;
   HttpTunnelConsumer *selfc = nullptr;
 
-  STATE_ENTER(&HttpSM::tunnel_handler_trailer_ua, event);
+  STATE_ENTER(tunnel_handler_trailer_ua, event);
   ink_assert(c->vc == _ua.get_txn());
   ATS_PROBE1(milestone_ua_close, sm_id);
   milestones[TS_MILESTONE_UA_CLOSE] = ink_get_hrtime();
@@ -3810,7 +3810,7 @@ HttpSM::tunnel_handler_trailer_ua(int event, HttpTunnelConsumer *c)
 int
 HttpSM::tunnel_handler_ua_push(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_ua_push, event);
+  STATE_ENTER(tunnel_handler_ua_push, event);
 
   pushed_response_body_bytes += p->bytes_read;
   client_request_body_bytes  += p->bytes_read;
@@ -3850,7 +3850,7 @@ HttpSM::tunnel_handler_ua_push(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_cache_read(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_cache_read, event);
+  STATE_ENTER(tunnel_handler_cache_read, event);
 
   switch (event) {
   case VC_EVENT_ERROR:
@@ -3890,7 +3890,7 @@ HttpSM::tunnel_handler_cache_read(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_cache_write(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_cache_write, event);
+  STATE_ENTER(tunnel_handler_cache_write, event);
   SMDbg(dbg_ctl_http, "handling cache event: %s", HttpDebugNames::get_event_name(event));
 
   HttpTransact::CacheWriteStatus_t *status_ptr = (c->producer->vc_type == HttpTunnelType_t::TRANSFORM) ?
@@ -3948,7 +3948,7 @@ HttpSM::tunnel_handler_cache_write(int event, HttpTunnelConsumer *c)
 int
 HttpSM::tunnel_handler_post_ua(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_post_ua, event);
+  STATE_ENTER(tunnel_handler_post_ua, event);
 
   // Now that the tunnel is done, it can tell us how many bytes were in the
   // body.
@@ -4052,7 +4052,7 @@ HttpSM::tunnel_handler_post_ua(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_for_partial_post(int event, void * /* data ATS_UNUSED */)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_for_partial_post, event);
+  STATE_ENTER(tunnel_handler_for_partial_post, event);
   tunnel.deallocate_buffers();
   tunnel.reset();
 
@@ -4072,7 +4072,7 @@ HttpSM::tunnel_handler_for_partial_post(int event, void * /* data ATS_UNUSED */)
 int
 HttpSM::tunnel_handler_post_server(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_post_server, event);
+  STATE_ENTER(tunnel_handler_post_server, event);
 
   // If is_using_post_buffer has been used, then this handler gets called
   // twice, once with the buffered request body bytes and a second time with
@@ -4193,7 +4193,7 @@ HttpSM::tunnel_handler_post_server(int event, HttpTunnelConsumer *c)
 int
 HttpSM::tunnel_handler_ssl_producer(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_ssl_producer, event);
+  STATE_ENTER(tunnel_handler_ssl_producer, event);
 
   switch (event) {
   case VC_EVENT_READ_READY:
@@ -4269,7 +4269,7 @@ HttpSM::tunnel_handler_ssl_producer(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_ssl_consumer(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_ssl_consumer, event);
+  STATE_ENTER(tunnel_handler_ssl_consumer, event);
 
   switch (event) {
   case VC_EVENT_ERROR:
@@ -4340,7 +4340,7 @@ HttpSM::tunnel_handler_ssl_consumer(int event, HttpTunnelConsumer *c)
 int
 HttpSM::tunnel_handler_transform_write(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_transform_write, event);
+  STATE_ENTER(tunnel_handler_transform_write, event);
 
   HttpTransformInfo *i;
 
@@ -4425,7 +4425,7 @@ HttpSM::tunnel_handler_transform_write(int event, HttpTunnelConsumer *c)
 int
 HttpSM::tunnel_handler_transform_read(int event, HttpTunnelProducer *p)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_transform_read, event);
+  STATE_ENTER(tunnel_handler_transform_read, event);
 
   ink_assert(p->vc == transform_info.vc || p->vc == post_transform_info.vc);
 
@@ -4469,7 +4469,7 @@ HttpSM::tunnel_handler_transform_read(int event, HttpTunnelProducer *p)
 int
 HttpSM::tunnel_handler_plugin_agent(int event, HttpTunnelConsumer *c)
 {
-  STATE_ENTER(&HttpSM::tunnel_handler_plugin_client, event);
+  STATE_ENTER(tunnel_handler_plugin_agent, event);
 
   switch (event) {
   case VC_EVENT_ERROR:
@@ -4498,7 +4498,7 @@ HttpSM::tunnel_handler_plugin_agent(int event, HttpTunnelConsumer *c)
 int
 HttpSM::state_remap_request(int event, void * /* data ATS_UNUSED */)
 {
-  STATE_ENTER(&HttpSM::state_remap_request, event);
+  STATE_ENTER(state_remap_request, event);
 
   switch (event) {
   case EVENT_REMAP_ERROR: {
@@ -6211,7 +6211,7 @@ HttpSM::release_server_session(bool serve_from_cache)
 void
 HttpSM::handle_post_failure()
 {
-  STATE_ENTER(&HttpSM::handle_post_failure, VC_EVENT_NONE);
+  STATE_ENTER(handle_post_failure, VC_EVENT_NONE);
 
   ink_assert(_ua.get_entry()->vc == _ua.get_txn());
   ink_assert(is_waiting_for_full_body || server_entry->eos == true);
@@ -6308,7 +6308,7 @@ HttpSM::handle_server_setup_error(int event, void *data)
   VIO *vio = static_cast<VIO *>(data);
   ink_assert(vio != nullptr);
 
-  STATE_ENTER(&HttpSM::handle_server_setup_error, event);
+  STATE_ENTER(handle_server_setup_error, event);
 
   // If there is POST or PUT tunnel wait for the tunnel
   //  to figure out that things have gone to hell


(trafficserver) 05/07: curl 8.20 test update: curl PROXY destination changes (#13239)

Posted by cm...@apache.org.
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 eb87119894038bfd1cbbafc6b5d07cfe34ddef59
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Thu Jun 4 15:40:15 2026 -0500

    curl 8.20 test update: curl PROXY destination changes (#13239)
    
    curl 8.20 intentionally mirrors --haproxy-clientip into both PROXY
    addresses to keep the header address family consistent. The
    TSVConnPPInfo AuTest still expected the older destination address, so
    jobs with newer curl failed even though ATS preserved the PROXY metadata
    it received.
    
    This relaxes the destination-address expectation to accept either curl
    behavior while continuing to verify the source address and PROXY
    metadata. This also wraps the long curl command strings while leaving
    the test's request flow unchanged.
    
    (cherry picked from commit ad0ce02abf550455896167fa79ca1224f939cf1c)
---
 .../gold_tests/pluginTest/tsapi/test_TSVConnPPInfo.test.py  | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/gold_tests/pluginTest/tsapi/test_TSVConnPPInfo.test.py b/tests/gold_tests/pluginTest/tsapi/test_TSVConnPPInfo.test.py
index 0c45109d97..e74e2c40d6 100644
--- a/tests/gold_tests/pluginTest/tsapi/test_TSVConnPPInfo.test.py
+++ b/tests/gold_tests/pluginTest/tsapi/test_TSVConnPPInfo.test.py
@@ -73,7 +73,9 @@ Test.Env["OUTPUT_FILE"] = log_path
 # plaintext HTTP
 tr = Test.AddTestRun()
 tr.TimeOut = 10
-tr.Processes.Default.Command = f"curl --haproxy-protocol --haproxy-clientip 1.2.3.4 'http://127.0.0.1:{ts.Variables.proxy_protocol_port}/httpbin/get'"
+tr.Processes.Default.Command = (
+    f"curl --haproxy-protocol --haproxy-clientip 1.2.3.4 "
+    f"'http://127.0.0.1:{ts.Variables.proxy_protocol_port}/httpbin/get'")
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.StartBefore(httpbin)
 tr.Processes.Default.StartBefore(Test.Processes.ts)
@@ -84,7 +86,9 @@ tr.StillRunningAfter = ts
 # HTTPS
 tr = Test.AddTestRun()
 tr.TimeOut = 10
-tr.Processes.Default.Command = f"curl --haproxy-protocol --haproxy-clientip 5.6.7.8 -k 'https://127.0.0.1:{ts.Variables.proxy_protocol_ssl_port}/httpbin/get'"
+tr.Processes.Default.Command = (
+    f"curl --haproxy-protocol --haproxy-clientip 5.6.7.8 -k "
+    f"'https://127.0.0.1:{ts.Variables.proxy_protocol_ssl_port}/httpbin/get'")
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Streams.stdout = "test_TSVConnPPInfo_curl1.gold"
 tr.StillRunningAfter = httpbin
@@ -95,7 +99,8 @@ tr.Processes.Default.Command = "echo check log"
 tr.Processes.Default.ReturnCode = 0
 f = tr.Disk.File(log_path)
 f.Content = "test_TSVConnPPInfo_plugin_log.gold"
+# curl 8.20+ intentionally uses --haproxy-clientip for both PROXY addresses so the address family matches.
 f.Content += Testers.ContainsExpression(
-    "PP Info Received:V1,P2,T1,SRC1.2.3.4,DST127.0.0.1", "Expected information should be received")
+    r"PP Info Received:V1,P2,T1,SRC1\.2\.3\.4,DST(127\.0\.0\.1|1\.2\.3\.4)", "Expected information should be received")
 f.Content += Testers.ContainsExpression(
-    "PP Info Received:V1,P2,T1,SRC5.6.7.8,DST127.0.0.1", "Expected information should be received")
+    r"PP Info Received:V1,P2,T1,SRC5\.6\.7\.8,DST(127\.0\.0\.1|5\.6\.7\.8)", "Expected information should be received")


(trafficserver) 04/07: Fix Proxy-Protocol log field symbols (#13345)

Posted by cm...@apache.org.
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 13e13b3670d882c78b6031a2c8036ff91a69b32c
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Thu Jul 2 16:05:01 2026 +0900

    Fix Proxy-Protocol log field symbols (#13345)
    
    (cherry picked from commit 77725182a55f5248d3985d67a617c94478547619)
---
 src/proxy/logging/Log.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/proxy/logging/Log.cc b/src/proxy/logging/Log.cc
index cbad6829ae..7cc794007d 100644
--- a/src/proxy/logging/Log.cc
+++ b/src/proxy/logging/Log.cc
@@ -1061,12 +1061,12 @@ Log::init_fields()
   field = new LogField("proxy_protocol_src_ip", "pps", LogField::IP, &LogAccess::marshal_proxy_protocol_src_ip,
                        &LogAccess::unmarshal_ip_to_str);
   global_field_list.add(field, false);
-  field_symbol_hash.emplace("ppsip", field);
+  field_symbol_hash.emplace("pps", field);
 
   field = new LogField("proxy_protocol_dst_ip", "ppd", LogField::IP, &LogAccess::marshal_proxy_protocol_dst_ip,
                        &LogAccess::unmarshal_ip_to_str);
   global_field_list.add(field, false);
-  field_symbol_hash.emplace("ppdip", field);
+  field_symbol_hash.emplace("ppd", field);
 
   field = new LogField("proxy_protocol_authority", "ppa", LogField::STRING, &LogAccess::marshal_proxy_protocol_authority,
                        &LogAccess::unmarshal_str);


(trafficserver) 07/07: Expand client IP debug logging test coverage (#13290)

Posted by cm...@apache.org.
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 f28ec6386acddf22a8b69e135b7394aec8fbe57e
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Jun 26 19:49:09 2026 -0500

    Expand client IP debug logging test coverage (#13290)
    
    Before this patch, the client ip debug logging test only covered one
    HTTP transaction, so regressions across protocols or persistent client
    sessions could pass unnoticed.
    
    This converts the test to replay-driven coverage for HTTP, HTTPS, and
    HTTP/2, with an HTTP/3 scenario enabled when QUICHE is available. Each
    replay sends multiple transactions on one client connection and checks
    that all four request and response header dumps include per-transaction
    markers.
    
    This test found no issues, thus this is a test-only patch.
    
    (cherry picked from commit a2c55e3dbe918b229981074c6c81a92b5534c88f)
---
 tests/gold_tests/autest-site/ats_replay.test.ext   |  33 +++--
 .../gold_tests/logging/log-debug-client-ip.test.py |  39 ++----
 .../replay/log-debug-client-ip-http.replay.yaml    | 129 +++++++++++++++++++
 .../replay/log-debug-client-ip-http2.replay.yaml   | 134 ++++++++++++++++++++
 .../replay/log-debug-client-ip-http3.replay.yaml   | 136 +++++++++++++++++++++
 .../replay/log-debug-client-ip-https.replay.yaml   | 134 ++++++++++++++++++++
 6 files changed, 561 insertions(+), 44 deletions(-)

diff --git a/tests/gold_tests/autest-site/ats_replay.test.ext b/tests/gold_tests/autest-site/ats_replay.test.ext
index 3f12395711..440f9ae22d 100644
--- a/tests/gold_tests/autest-site/ats_replay.test.ext
+++ b/tests/gold_tests/autest-site/ats_replay.test.ext
@@ -23,6 +23,15 @@ import re
 import yaml
 
 
+def _contains_expression(contains_entry: dict, default_description: str):
+    '''Create a ContainsExpression tester from a log validation entry.'''
+    expression = contains_entry['expression']
+    description = contains_entry.get('description', default_description)
+    reflags = re.S | re.M if contains_entry.get('multiline', False) else 0
+
+    return Testers.ContainsExpression(expression, description, reflags=reflags)
+
+
 def configure_ats(obj: 'TestRun', server: 'Process', ats_config: dict, dns: Optional['Process'] = None):
     '''Configure ATS per the configuration in the replay file.
 
@@ -133,8 +142,7 @@ def configure_ats(obj: 'TestRun', server: 'Process', ats_config: dict, dns: Opti
         traffic_out = log_validation.get('traffic_out', {})
         for contains_entry in traffic_out.get('contains', []):
             expression = contains_entry['expression']
-            description = contains_entry.get('description', f'Verify traffic_out contains: {expression}')
-            ts.Disk.traffic_out.Content += Testers.ContainsExpression(expression, description)
+            ts.Disk.traffic_out.Content += _contains_expression(contains_entry, f'Verify traffic_out contains: {expression}')
         for excludes_entry in traffic_out.get('excludes', []):
             expression = excludes_entry['expression']
             description = excludes_entry.get('description', f'Verify traffic_out excludes: {expression}')
@@ -148,8 +156,7 @@ def configure_ats(obj: 'TestRun', server: 'Process', ats_config: dict, dns: Opti
         diags_log = log_validation.get('diags_log', {})
         for contains_entry in diags_log.get('contains', []):
             expression = contains_entry['expression']
-            description = contains_entry.get('description', f'Verify diags_log contains: {expression}')
-            ts.Disk.diags_log.Content += Testers.ContainsExpression(expression, description)
+            ts.Disk.diags_log.Content += _contains_expression(contains_entry, f'Verify diags_log contains: {expression}')
         for excludes_entry in diags_log.get('excludes', []):
             expression = excludes_entry['expression']
             description = excludes_entry.get('description', f'Verify diags_log excludes: {expression}')
@@ -163,8 +170,7 @@ def configure_ats(obj: 'TestRun', server: 'Process', ats_config: dict, dns: Opti
         error_log = log_validation.get('error_log', {})
         for contains_entry in error_log.get('contains', []):
             expression = contains_entry['expression']
-            description = contains_entry.get('description', f'Verify error_log contains: {expression}')
-            ts.Disk.error_log.Content += Testers.ContainsExpression(expression, description)
+            ts.Disk.error_log.Content += _contains_expression(contains_entry, f'Verify error_log contains: {expression}')
         for excludes_entry in error_log.get('excludes', []):
             expression = excludes_entry['expression']
             description = excludes_entry.get('description', f'Verify error_log excludes: {expression}')
@@ -259,8 +265,7 @@ def ATSReplayTest(obj, replay_file: str):
     if server_log_validation:
         for contains_entry in server_log_validation.get('contains', []):
             expression = contains_entry['expression']
-            description = contains_entry.get('description', f'Verify server output contains: {expression}')
-            server.Streams.All += Testers.ContainsExpression(expression, description)
+            server.Streams.All += _contains_expression(contains_entry, f'Verify server output contains: {expression}')
         for excludes_entry in server_log_validation.get('excludes', []):
             expression = excludes_entry['expression']
             description = excludes_entry.get('description', f'Verify server output excludes: {expression}')
@@ -272,6 +277,7 @@ def ATSReplayTest(obj, replay_file: str):
     ats_config = autest_config['ats']
     process_config = ats_config.get('process_config', {})
     enable_tls = process_config.get('enable_tls', False)
+    enable_quic = process_config.get('enable_quic', False)
     metric_checks = ats_config.get('metric_checks', [])
     log_validation = ats_config.get('log_validation', None)
 
@@ -283,10 +289,12 @@ def ATSReplayTest(obj, replay_file: str):
         raise ValueError(f"Replay file {replay_file} does not contain 'autest.client' section")
     client_config = autest_config['client']
     name = client_config.get('name', 'client')
-    process_config = client_config.get('process_config', {})
-    https_ports = [ts.Variables.ssl_port] if enable_tls else None
+    process_config = client_config.get('process_config', {}).copy()
+    http_ports = process_config.pop('http_ports', [ts.Variables.port])
+    https_ports = process_config.pop('https_ports', [ts.Variables.ssl_port] if enable_tls else None)
+    http3_ports = process_config.pop('http3_ports', [ts.Variables.ssl_port] if enable_quic else None)
     client = tr.AddVerifierClientProcess(
-        name, replay_file, http_ports=[ts.Variables.port], https_ports=https_ports, **process_config)
+        name, replay_file, http_ports=http_ports, https_ports=https_ports, http3_ports=http3_ports, **process_config)
 
     # Set expected return code if specified. A list of codes is wrapped in
     # Any() so that any of the listed values is accepted.
@@ -299,8 +307,7 @@ def ATSReplayTest(obj, replay_file: str):
     if client_log_validation:
         for contains_entry in client_log_validation.get('contains', []):
             expression = contains_entry['expression']
-            description = contains_entry.get('description', f'Verify client output contains: {expression}')
-            client.Streams.All += Testers.ContainsExpression(expression, description)
+            client.Streams.All += _contains_expression(contains_entry, f'Verify client output contains: {expression}')
         for excludes_entry in client_log_validation.get('excludes', []):
             expression = excludes_entry['expression']
             description = excludes_entry.get('description', f'Verify client output excludes: {expression}')
diff --git a/tests/gold_tests/logging/log-debug-client-ip.test.py b/tests/gold_tests/logging/log-debug-client-ip.test.py
index 4516fb893c..a6894d8a65 100644
--- a/tests/gold_tests/logging/log-debug-client-ip.test.py
+++ b/tests/gold_tests/logging/log-debug-client-ip.test.py
@@ -1,4 +1,5 @@
 '''
+Verify debug logging filtered by client IP.
 '''
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -16,39 +17,15 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-import os
-
 Test.Summary = '''
-Test log filter.
+Verify per-client-IP debug logging emits request and response header dumps.
 '''
 
-ts = Test.MakeATSProcess("ts", enable_cache=False)
-replay_file = "log-filter.replays.yaml"
-server = Test.MakeVerifierServerProcess("server", replay_file)
-nameserver = Test.MakeDNServer("dns", default='127.0.0.1')
-
-ts.Disk.records_config.update(
-    {
-        'proxy.config.diags.debug.enabled': 2,
-        'proxy.config.diags.debug.tags': 'http',
-        'proxy.config.diags.debug.client_ip': '127.0.0.1',
-        'proxy.config.dns.nameservers': f"127.0.0.1:{nameserver.Variables.Port}",
-    })
-ts.Disk.remap_config.AddLine('map / http://localhost:{}/'.format(server.Variables.http_port))
+Test.ContinueOnFail = True
 
-# Verify that the various aspects of the expected debug output for the
-# transaction are logged.
-ts.Disk.traffic_out.Content = Testers.ContainsExpression(
-    r"\+ Incoming Request \+", "Make sure the client request information is present.")
-ts.Disk.traffic_out.Content += Testers.ContainsExpression(
-    r"\+ Proxy's Request after hooks \+", "Make sure the proxy request information is present.")
-ts.Disk.traffic_out.Content += Testers.ContainsExpression(
-    r"\+ Incoming O.S. Response \+", "Make sure the server's response information is present.")
-ts.Disk.traffic_out.Content += Testers.ContainsExpression(
-    r"\+ Proxy's Response 2 \+", "Make sure the proxy response information is present.")
+Test.ATSReplayTest(replay_file='replay/log-debug-client-ip-http.replay.yaml')
+Test.ATSReplayTest(replay_file='replay/log-debug-client-ip-https.replay.yaml')
+Test.ATSReplayTest(replay_file='replay/log-debug-client-ip-http2.replay.yaml')
 
-tr = Test.AddTestRun()
-tr.Processes.Default.StartBefore(server)
-tr.Processes.Default.StartBefore(ts)
-tr.Processes.Default.StartBefore(nameserver)
-tr.AddVerifierClientProcess("client-1", replay_file, http_ports=[ts.Variables.port], other_args="--keys test-1")
+if Condition.HasATSFeature('TS_HAS_QUICHE') and Condition.HasCurlFeature('http3'):
+    Test.ATSReplayTest(replay_file='replay/log-debug-client-ip-http3.replay.yaml')
diff --git a/tests/gold_tests/logging/replay/log-debug-client-ip-http.replay.yaml b/tests/gold_tests/logging/replay/log-debug-client-ip-http.replay.yaml
new file mode 100644
index 0000000000..f92d3336d6
--- /dev/null
+++ b/tests/gold_tests/logging/replay/log-debug-client-ip-http.replay.yaml
@@ -0,0 +1,129 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTP/1.1'
+
+  server:
+    name: 'server-log-debug-client-ip-http'
+
+  client:
+    name: 'client-log-debug-client-ip-http'
+
+  ats:
+    name: 'ts-log-debug-client-ip-http'
+    process_config:
+      enable_cache: false
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+
+    remap_config:
+    - from: 'http://debug-client-ip-http.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http-1'
+          description: 'HTTP transaction 1 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http-1'
+          description: 'HTTP transaction 1 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http-1'
+          description: 'HTTP transaction 1 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http-1'
+          description: 'HTTP transaction 1 logs the proxy response headers.'
+          multiline: true
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http-2'
+          description: 'HTTP transaction 2 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http-2'
+          description: 'HTTP transaction 2 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http-2'
+          description: 'HTTP transaction 2 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http-2'
+          description: 'HTTP transaction 2 logs the proxy response headers.'
+          multiline: true
+
+sessions:
+- transactions:
+  - client-request:
+      method: GET
+      url: /debug-http-1
+      version: '1.1'
+      headers:
+        fields:
+        - [Host, debug-client-ip-http.test]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http-1]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http-1, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http-1]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http-1, as: equal }]
+
+  - client-request:
+      method: GET
+      url: /debug-http-2
+      version: '1.1'
+      headers:
+        fields:
+        - [Host, debug-client-ip-http.test]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http-2]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http-2, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http-2]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http-2, as: equal }]
diff --git a/tests/gold_tests/logging/replay/log-debug-client-ip-http2.replay.yaml b/tests/gold_tests/logging/replay/log-debug-client-ip-http2.replay.yaml
new file mode 100644
index 0000000000..5230a7ebeb
--- /dev/null
+++ b/tests/gold_tests/logging/replay/log-debug-client-ip-http2.replay.yaml
@@ -0,0 +1,134 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTP/2'
+
+  server:
+    name: 'server-log-debug-client-ip-http2'
+
+  client:
+    name: 'client-log-debug-client-ip-http2'
+
+  ats:
+    name: 'ts-log-debug-client-ip-http2'
+    process_config:
+      enable_cache: false
+      enable_tls: true
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+
+    remap_config:
+    - from: 'https://debug-client-ip-http2.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http2-1'
+          description: 'HTTP/2 transaction 1 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http2-1'
+          description: 'HTTP/2 transaction 1 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http2-1'
+          description: 'HTTP/2 transaction 1 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http2-1'
+          description: 'HTTP/2 transaction 1 logs the proxy response headers.'
+          multiline: true
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http2-2'
+          description: 'HTTP/2 transaction 2 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http2-2'
+          description: 'HTTP/2 transaction 2 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http2-2'
+          description: 'HTTP/2 transaction 2 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http2-2'
+          description: 'HTTP/2 transaction 2 logs the proxy response headers.'
+          multiline: true
+
+sessions:
+- protocol:
+    stack: http2
+    tls:
+      sni: debug-client-ip-http2.test
+  transactions:
+  - client-request:
+      headers:
+        fields:
+        - [":method", GET]
+        - [":scheme", https]
+        - [":authority", debug-client-ip-http2.test]
+        - [":path", /debug-http2-1]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http2-1]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http2-1, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http2-1]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http2-1, as: equal }]
+
+  - client-request:
+      headers:
+        fields:
+        - [":method", GET]
+        - [":scheme", https]
+        - [":authority", debug-client-ip-http2.test]
+        - [":path", /debug-http2-2]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http2-2]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http2-2, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http2-2]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http2-2, as: equal }]
diff --git a/tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml b/tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml
new file mode 100644
index 0000000000..d0599f91a0
--- /dev/null
+++ b/tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml
@@ -0,0 +1,136 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTP/3'
+
+  server:
+    name: 'server-log-debug-client-ip-http3'
+
+  client:
+    name: 'client-log-debug-client-ip-http3'
+
+  ats:
+    name: 'ts-log-debug-client-ip-http3'
+    process_config:
+      enable_cache: false
+      enable_tls: true
+      enable_quic: true
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+      proxy.config.quic.no_activity_timeout_in: 0
+
+    remap_config:
+    - from: 'https://debug-client-ip-http3.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the proxy response headers.'
+          multiline: true
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the proxy response headers.'
+          multiline: true
+
+sessions:
+- protocol:
+    stack: http3
+    tls:
+      sni: debug-client-ip-http3.test
+  transactions:
+  - client-request:
+      headers:
+        fields:
+        - [":method", GET]
+        - [":scheme", https]
+        - [":authority", debug-client-ip-http3.test]
+        - [":path", /debug-http3-1]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http3-1]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http3-1, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http3-1]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http3-1, as: equal }]
+
+  - client-request:
+      headers:
+        fields:
+        - [":method", GET]
+        - [":scheme", https]
+        - [":authority", debug-client-ip-http3.test]
+        - [":path", /debug-http3-2]
+        - [Content-Length, 0]
+        - [uuid, log-debug-http3-2]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http3-2, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-http3-2]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-http3-2, as: equal }]
diff --git a/tests/gold_tests/logging/replay/log-debug-client-ip-https.replay.yaml b/tests/gold_tests/logging/replay/log-debug-client-ip-https.replay.yaml
new file mode 100644
index 0000000000..79e9b5aa4b
--- /dev/null
+++ b/tests/gold_tests/logging/replay/log-debug-client-ip-https.replay.yaml
@@ -0,0 +1,134 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTPS'
+
+  server:
+    name: 'server-log-debug-client-ip-https'
+
+  client:
+    name: 'client-log-debug-client-ip-https'
+
+  ats:
+    name: 'ts-log-debug-client-ip-https'
+    process_config:
+      enable_cache: false
+      enable_tls: true
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+
+    remap_config:
+    - from: 'https://debug-client-ip-https.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-https-1'
+          description: 'HTTPS transaction 1 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-https-1'
+          description: 'HTTPS transaction 1 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-https-1'
+          description: 'HTTPS transaction 1 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-https-1'
+          description: 'HTTPS transaction 1 logs the proxy response headers.'
+          multiline: true
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after hooks \+)[\s\S])*?uuid: log-debug-https-2'
+          description: 'HTTPS transaction 2 logs the incoming request headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming O.S. Response \+)[\s\S])*?uuid: log-debug-https-2'
+          description: 'HTTPS transaction 2 logs the proxy request headers after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 2 \+)[\s\S])*?uuid: log-debug-https-2'
+          description: 'HTTPS transaction 2 logs the incoming origin response headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+(?:(?!\+ Incoming Request \+)[\s\S])*?uuid: log-debug-https-2'
+          description: 'HTTPS transaction 2 logs the proxy response headers.'
+          multiline: true
+
+sessions:
+- protocol:
+    stack: https
+    tls:
+      sni: debug-client-ip-https.test
+  transactions:
+  - client-request:
+      method: GET
+      url: /debug-https-1
+      version: '1.1'
+      headers:
+        fields:
+        - [Host, debug-client-ip-https.test]
+        - [Content-Length, 0]
+        - [uuid, log-debug-https-1]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-https-1, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-https-1]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-https-1, as: equal }]
+
+  - client-request:
+      method: GET
+      url: /debug-https-2
+      version: '1.1'
+      headers:
+        fields:
+        - [Host, debug-client-ip-https.test]
+        - [Content-Length, 0]
+        - [uuid, log-debug-https-2]
+
+    proxy-request:
+      headers:
+        fields:
+        - [uuid, { value: log-debug-https-2, as: equal }]
+
+    server-response:
+      status: 200
+      reason: OK
+      headers:
+        fields:
+        - [Content-Length, 0]
+        - [uuid, log-debug-https-2]
+
+    proxy-response:
+      status: 200
+      headers:
+        fields:
+        - [uuid, { value: log-debug-https-2, as: equal }]


(trafficserver) 06/07: Throttle OCSP cert-status error instead of logging on every handshake (#13312)

Posted by cm...@apache.org.
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 a63417f33db888e2ee30516c655b392851ee0362
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Wed Jul 1 15:26:43 2026 -0600

    Throttle OCSP cert-status error instead of logging on every handshake (#13312)
    
    ssl_callback_ocsp_stapling() emitted an Error on every TLS handshake when
    a cert's OCSP response was missing or expired, which could flood error.log.
    Use SiteThrottledError so ops are still alerted at Error severity but the
    message is rate-limited per call site (default 60s) with a suppressed-count.
    
    Co-authored-by: Evan Zelkowitz <e_...@apple.com>
    (cherry picked from commit 82c4de1609a7f25a4e9fbd71e5a7d07b24495ea7)
---
 src/iocore/net/OCSPStapling.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/iocore/net/OCSPStapling.cc b/src/iocore/net/OCSPStapling.cc
index 342e0dea49..e1c2e4ca3b 100644
--- a/src/iocore/net/OCSPStapling.cc
+++ b/src/iocore/net/OCSPStapling.cc
@@ -1423,7 +1423,7 @@ ssl_callback_ocsp_stapling(SSL *ssl, void *)
   time_t current_time = time(nullptr);
   if ((cinf->resp_derlen == 0 || cinf->is_expire) || (cinf->expire_time < current_time && !cinf->is_prefetched)) {
     ink_mutex_release(&cinf->stapling_mutex);
-    Error("ssl_callback_ocsp_stapling: failed to get certificate status for %s", cinf->certname);
+    SiteThrottledError("ssl_callback_ocsp_stapling: failed to get certificate status for %s", cinf->certname);
     return SSL_TLSEXT_ERR_NOACK;
   } else {
 #ifdef OPENSSL_IS_BORINGSSL


(trafficserver) 01/07: traffic_crashlog: emit a well-formed report when the backtrace is empty (#13360)

Posted by cm...@apache.org.
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 e09d13bc82935fded744c9e3f63e1fd6699a66cb
Author: Mo Chen <mo...@apache.org>
AuthorDate: Sat Jul 4 19:45:26 2026 -0500

    traffic_crashlog: emit a well-formed report when the backtrace is empty (#13360)
    
    ServerBacktrace() reports success but yields no frames when the
    target's thread list is unreadable -- e.g. a fast-aborting target has
    already exited by the time the forked helper attaches. The success
    check only tested for a null trace, so an empty-but-non-null trace
    fell into the success path and produced a report with no backtrace
    and no explanation. Require a non-empty trace before treating
    ServerBacktrace as having succeeded, so the empty case falls through
    to the existing in-process-backtrace and diagnostic-message fallback.
    
    (cherry picked from commit 66845d68778062fe02cef685d6dabeea4b2266f4)
---
 src/traffic_crashlog/traffic_crashlog.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/traffic_crashlog/traffic_crashlog.cc b/src/traffic_crashlog/traffic_crashlog.cc
index dd77893ffa..bf9925e834 100644
--- a/src/traffic_crashlog/traffic_crashlog.cc
+++ b/src/traffic_crashlog/traffic_crashlog.cc
@@ -145,14 +145,18 @@ crashlog_write_backtrace(FILE *fp, const crashlog_target &target)
   // can also happen without a debugger. Possibly in that case, there is a race with the
   // kernel locking the process information?
 
-  if (mgmterr == 0 && trace != nullptr) {
+  if (mgmterr == 0 && trace != nullptr && trace[0] != '\0') {
     // ServerBacktrace succeeded - this gives us backtraces for all threads.
     fprintf(fp, "%s", trace);
     free(trace);
     return true;
   }
+  free(trace);
 
-  // ServerBacktrace failed. Fall back to the in-process backtrace from the crashing thread.
+  // ServerBacktrace reports success but yields no frames when the target's thread list is
+  // unreadable -- e.g. a fast-aborting target has already exited by the time the forked
+  // helper attaches. Fall back to the in-process backtrace from the crashing thread rather
+  // than emitting an empty report.
   if ((target.flags & CRASHLOG_HAVE_BACKTRACE) && !target.backtrace.empty()) {
     fprintf(fp, "Crashing Thread Backtrace:\n%s", target.backtrace.c_str());
     return true;


(trafficserver) 02/07: Cleanup: remove unused functions related connect attempts (#13357)

Posted by cm...@apache.org.
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 eabd09017b1b6c0fcb2b7d874892abd63b7f9e46
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Jul 3 08:10:06 2026 +0900

    Cleanup: remove unused functions related connect attempts (#13357)
    
    (cherry picked from commit a24dd801712d0ab1df4a6858b93f148a01203ae7)
---
 include/proxy/http/HttpTransact.h |  3 ---
 src/proxy/http/HttpTransact.cc    | 22 ----------------------
 2 files changed, 25 deletions(-)

diff --git a/include/proxy/http/HttpTransact.h b/include/proxy/http/HttpTransact.h
index 9215f5508e..b918fa0c27 100644
--- a/include/proxy/http/HttpTransact.h
+++ b/include/proxy/http/HttpTransact.h
@@ -1030,9 +1030,7 @@ public:
   static void handle_transform_ready(State *s);
   static void handle_transform_cache_write(State *s);
   static void handle_response_from_parent(State *s);
-  static void handle_response_from_parent_plugin(State *s);
   static void handle_response_from_server(State *s);
-  static void delete_server_rr_entry(State *s, int max_retries);
   static void retry_server_connection_not_open(State *s, unsigned max_retries);
   static void error_log_connection_failure(State *s, ServerState_t conn_state);
   static void handle_server_connection_not_open(State *s);
@@ -1084,7 +1082,6 @@ public:
   static void initialize_state_variables_from_request(State *s, HTTPHdr *obsolete_incoming_request);
 
   static void initialize_state_variables_from_response(State *s, HTTPHdr *incoming_response);
-  static bool is_server_negative_cached(State *s);
   static bool is_cache_response_returnable(State *s);
   static bool is_stale_cache_response_returnable(State *s);
   static bool need_to_revalidate(State *s);
diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index 975eb4568a..f7a12a0ce4 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -540,28 +540,6 @@ update_cache_control_information_from_config(HttpTransact::State *s)
   }
 }
 
-bool
-HttpTransact::is_server_negative_cached(State *s)
-{
-  if (s->dns_info.active && s->dns_info.active->last_fail_time() != TS_TIME_ZERO &&
-      s->dns_info.active->last_fail_time() + s->txn_conf->down_server_timeout > ts_clock::from_time_t(s->client_request_time)) {
-    return true;
-  } else {
-    // Make sure some nasty clock skew has not happened
-    //  Use the server timeout to set an upperbound as to how far in the
-    //   future we should tolerate bogus last failure times.  This sets
-    //   the upper bound to the time that we would ever consider a server
-    //   down to 2*down_server_timeout
-    if (s->dns_info.active &&
-        ts_clock::from_time_t(s->client_request_time) + s->txn_conf->down_server_timeout < s->dns_info.active->last_fail_time()) {
-      s->dns_info.active->mark_up();
-      ink_assert(!"extreme clock skew");
-      return true;
-    }
-    return false;
-  }
-}
-
 /**
   ATS has two configuration options controlling how many times it retries a connection attempt against origin servers.