修改proto初始值为PROTO_UNKONWN

This commit is contained in:
崔一鸣
2019-11-20 19:55:59 +08:00
parent 0a11db6d2e
commit 8d954e4cc5

View File

@@ -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){ 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 //TODO: http: get from http protocol plugin
/* /*
if(is_http){ 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); result->domain_len = strnlen(chello->sni, sizeof(result->domain) - 1);
strncpy(result->domain, chello->sni, result->domain_len); strncpy(result->domain, chello->sni, result->domain_len);
} }
result->domain[result->domain_len] = '\0';
} }
ssl_chello_free(chello); ssl_chello_free(chello);
return; return;