From d8b595ff2b5926aa6209d166ca087d9a11355106 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Mon, 15 May 2023 16:38:56 +0800 Subject: [PATCH] =?UTF-8?q?TSG-15014:=20=E4=BD=BF=E7=94=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84bridge=20id=E8=8E=B7=E5=8F=96=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E5=AD=98=E5=82=A8=E7=A9=BA=E9=97=B4=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=86=85=E5=AD=98=E8=A2=AB=E8=A6=86=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_bridge.cpp | 2 +- src/tsg_entry.cpp | 7 ++++++- src/tsg_rule.cpp | 2 +- test/src/gtest_rule.cpp | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/tsg_bridge.cpp b/src/tsg_bridge.cpp index 1c018bd..a65db43 100644 --- a/src/tsg_bridge.cpp +++ b/src/tsg_bridge.cpp @@ -568,7 +568,7 @@ int session_runtime_action_context_async(const struct streaminfo *a_stream, void const struct session_runtime_action_context *session_runtime_action_context_new(const struct streaminfo *a_stream) { - struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_PROCESS_CONTEXT].id); + struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_ACTION_CONTEXT].id); if(srt_action_context==NULL) { srt_action_context=(struct session_runtime_action_context *)dictator_malloc(a_stream->threadnum, sizeof(struct session_runtime_action_context)); diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index cf03d1b..99f06d3 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1499,7 +1499,12 @@ size_t session_app_id_and_properties_scan(const struct streaminfo *a_stream, str srt_process_context->hited_para.after_n_packets=after_n_packets; } } - + + if(srt_process_context!=NULL && srt_process_context->hited_app_id>0) + { + session_app_gather_results_update_matched_app_id(a_stream, srt_process_context->hited_app_id); + } + return hit_num; } diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index cb17006..7759912 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -2800,7 +2800,7 @@ size_t tsg_scan_nesting_addr(const struct streaminfo *a_stream, struct maat *fea return 0; } - struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_get(a_stream); + struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_new(a_stream); srt_attribute_set_ip_asn(a_stream, feather, &(srt_attribute->client_asn), &(srt_attribute->server_asn)); srt_attribute_set_ip_location(a_stream, feather, &(srt_attribute->client_location), &(srt_attribute->server_location)); diff --git a/test/src/gtest_rule.cpp b/test/src/gtest_rule.cpp index 74ec87e..3a36338 100644 --- a/test/src/gtest_rule.cpp +++ b/test/src/gtest_rule.cpp @@ -14,6 +14,11 @@ extern struct maat_runtime_para g_tsg_maat_rt_para; +const struct session_runtime_attribute *session_runtime_attribute_new(const struct streaminfo * a_stream) +{ + return NULL; +} + const struct session_runtime_attribute *session_runtime_attribute_get(const struct streaminfo * a_stream) { return 0;