diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index 7bc0755..6c513db 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -42,7 +42,7 @@ static __attribute__((__used__)) const char * GIT_VERSION_UNKNOWN = NULL; #endif -char TSG_MASTER_VERSION_20200724=0; +char TSG_MASTER_VERSION_20200805=0; const char *tsg_conffile="tsgconf/main.conf"; g_tsg_para_t g_tsg_para; @@ -425,19 +425,19 @@ static int identify_application_protocol(struct streaminfo *a_stream, struct _id identify_info->proto = PROTO_UNKONWN; //http char *host=NULL; - ret=http_host_parser((char *)a_stream->ptcpdetail->pdata, (unsigned int)a_stream->ptcpdetail->datalen, DIR_C2S, &host); + ret=http_host_parser((char *)a_stream->ptcpdetail->pdata, (unsigned int)a_stream->ptcpdetail->datalen, a_stream->curdir, &host); if(ret>=0) { identify_info->proto=PROTO_HTTP; - if(ret==0) - { - identify_info->domain_len=0; - } - else + if(ret>0 && host!=NULL) { identify_info->domain_len=MIN(ret, (int)sizeof(identify_info->domain) - 1); strncpy(identify_info->domain, host, identify_info->domain_len); } + else + { + identify_info->domain_len=0; + } return 1; } diff --git a/src/version.map b/src/version.map index fbc44bc..a232a31 100644 --- a/src/version.map +++ b/src/version.map @@ -2,10 +2,7 @@ VERS_2.4{ global: extern "C++" { g_*; - *TSG_MASTER_INIT*; - *TSG_MASTER_TCP_ENTRY*; - *TSG_MASTER_UDP_ENTRY*; - *TSG_MASTER_UNLOAD*; + *TSG_MASTER*; *tsg_scan_nesting_addr*; *tsg_pull_policy_result*; *tsg_*;