summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2023-07-10 14:58:10 +0800
committerliuxueli <[email protected]>2023-07-10 14:58:10 +0800
commit2665555f069c5ecc6e875ffd64fe188aa277b217 (patch)
tree2ce56f092f9c231081d37a1030c1e2a79275855e /src
parent94c07e1f085571d92f10b4450b2df10edd7526e4 (diff)
修正识别结果,quic.ssl修正为quic
Diffstat (limited to 'src')
-rw-r--r--src/tsg_entry.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp
index 121762e..c910edc 100644
--- a/src/tsg_entry.cpp
+++ b/src/tsg_entry.cpp
@@ -1854,17 +1854,28 @@ int session_app_gather_results_update(struct app_attributes **update_result, cha
}
}
- int i;
-
- for(i=0; i<identify_result->app_id_num; i++)
- {
- (*update_result)[i].app_id=identify_result->origin;
- (*update_result)[i].app_id=identify_result->app_id[i];
- (*update_result)[i].surrogate_id=identify_result->surrogate_id[i];
- (*update_result)[i].packet_sequence=packet_sequence;
+ int idx=0;
+ unsigned int quic_id=tsg_l7_protocol_name2id(g_tsg_proto_name2id[PROTO_QUIC].name, g_tsg_proto_name2id[PROTO_QUIC].len);
+ for(int i=0; i<identify_result->app_id_num; i++)
+ {
+ (*update_result)[idx].app_id=identify_result->origin;
+ (*update_result)[idx].app_id=identify_result->app_id[i];
+ (*update_result)[idx].surrogate_id=identify_result->surrogate_id[i];
+ (*update_result)[idx].packet_sequence=packet_sequence;
+ idx++;
+
+ if(identify_result->app_id[i]==quic_id && (i+1 < identify_result->app_id_num))
+ {
+ unsigned int ssl_id=tsg_l7_protocol_name2id(g_tsg_proto_name2id[PROTO_SSL].name, g_tsg_proto_name2id[PROTO_SSL].len);
+ if(identify_result->app_id[i+1]==ssl_id)
+ {
+ i++;
+ continue;
+ }
+ }
}
- return i;
+ return idx;
}
int session_app_identify_result_cb(const struct streaminfo *a_stream, int bridge_id, void *data)