From 8d954e4cc58c9e10ef917eb6cad480a9a0a599e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E4=B8=80=E9=B8=A3?= Date: Wed, 20 Nov 2019 19:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9proto=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=80=BC=E4=B8=BAPROTO=5FUNKONWN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_rule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index f2dc007..245ae79 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -148,7 +148,7 @@ int tsg_rule_init(const char* conffile, void *logger) } static void protocol_identify(char *buff, int buff_len, struct _identify_info *result){ - result->proto = PROTO_MAX; + result->proto = PROTO_UNKONWN; //TODO: http: get from http protocol plugin /* if(is_http){ @@ -169,7 +169,6 @@ static void protocol_identify(char *buff, int buff_len, struct _identify_info *r result->domain_len = strnlen(chello->sni, sizeof(result->domain) - 1); strncpy(result->domain, chello->sni, result->domain_len); } - result->domain[result->domain_len] = '\0'; } ssl_chello_free(chello); return;