summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangmenglan <[email protected]>2023-06-16 20:00:09 +0800
committerwangmenglan <[email protected]>2023-06-16 20:00:09 +0800
commit7486f6f451d948f1a4c118e9dd1fbb9ec90ef7f7 (patch)
treec9a6c03fd7d62f5cded5b5a6678d0b12940d3077
parent88cb803124ac6e73e3221b03db5acbec62266fdb (diff)
🐞 fix(TSG-15620): Packet IO设置CMsg字段TFE_CMSG_STREAM_TRACE_IDv4.8.29-20230616
-rw-r--r--common/src/tfe_packet_io.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/src/tfe_packet_io.cpp b/common/src/tfe_packet_io.cpp
index 1b9e848..af26237 100644
--- a/common/src/tfe_packet_io.cpp
+++ b/common/src/tfe_packet_io.cpp
@@ -1195,6 +1195,7 @@ static int handle_session_opening(struct metadata *meta, struct ctrl_pkt_parser
uint8_t is_passthrough = 0;
uint8_t hit_no_intercept = 0;
uint16_t out_size = 0;
+ char stream_traceid[24] = {0};
char reason_hit_no_intercept[] = "Hit No Intercept";
char reason_invalid_intercept_param[] = "Invalid Intercept Param";
char reason_invalid_tcp_policy_param[] = "Invalid tcp policy Param";
@@ -1381,6 +1382,8 @@ passthrough:
route_ctx_copy(&s_ctx->raw_meta_e2i->route_ctx, &parser->ack_route_ctx);
}
+ snprintf(stream_traceid, 24, "%" PRIu64 , s_ctx->session_id);
+ tfe_cmsg_set(parser->cmsg, TFE_CMSG_STREAM_TRACE_ID, (const unsigned char *)stream_traceid, strlen(stream_traceid));
TFE_LOG_INFO(logger, "%s: session %lu %s active first", LOG_TAG_PKTIO, s_ctx->session_id, s_ctx->session_addr);
session_table_insert(thread->session_table, s_ctx->session_id, &(s_ctx->c2s_info.tuple4), s_ctx, session_value_free_cb);