From 3dae09781a38d70625a1f839ab4ac99a8e902b9a Mon Sep 17 00:00:00 2001 From: liuxueli Date: Mon, 21 Jun 2021 17:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AF=E5=B0=86=E5=9F=BA=E7=A1=80=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E7=BB=93=E6=9E=9C=E8=A6=86=E7=9B=96=E4=B8=BAunknown?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4common=5Fschema=5Ftype=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_entry.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 6e05965..6ec6594 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1029,7 +1029,6 @@ static int identify_application_protocol(const struct streaminfo *a_stream, stru { int ret=0, length=0; char buff[4096]={0}; - context->proto = PROTO_UNKONWN; switch(a_stream->type) { @@ -1185,6 +1184,11 @@ static int identify_application_protocol(const struct streaminfo *a_stream, stru default: break; } + + if(context->protoproto>PROTO_MAX) + { + context->proto = PROTO_UNKONWN; + } return ret; }