This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 42ad946 Traffic Dump: Use the correct transaction user index (#8548)
42ad946 is described below
commit 42ad9468ba1bb755959f29230f1ae337f21caded
Author: Brian Neradt <[email protected]>
AuthorDate: Wed Dec 8 13:16:13 2021 -0600
Traffic Dump: Use the correct transaction user index (#8548)
Traffic Dump has both session and transaction user data. In one of the
calls to TSUserArgGet, it accidentally used the session index to access
the transaction data. This could result in the corruption of another
plugin's session data. This patch fixes this so the correct index is
used.
---
plugins/experimental/traffic_dump/transaction_data.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/experimental/traffic_dump/transaction_data.cc
b/plugins/experimental/traffic_dump/transaction_data.cc
index d3b3eee..37fa708 100644
--- a/plugins/experimental/traffic_dump/transaction_data.cc
+++ b/plugins/experimental/traffic_dump/transaction_data.cc
@@ -479,7 +479,7 @@ TransactionData::global_transaction_handler(TSCont contp,
TSEvent event, void *e
}
case TS_EVENT_HTTP_TXN_CLOSE: {
- TransactionData *txnData = static_cast<TransactionData
*>(TSUserArgGet(txnp, SessionData::get_session_arg_index()));
+ TransactionData *txnData = static_cast<TransactionData
*>(TSUserArgGet(txnp, transaction_arg_index));
if (!txnData) {
TSError("[%s] No transaction data found for the close hook we registered
for.", traffic_dump::debug_tag);
break;