在UDP的流上识别SSH是错误的,调整ssh的识别位置,在TCP流上识别
This commit is contained in:
@@ -1220,6 +1220,16 @@ static int identify_application_protocol(const struct streaminfo *a_stream, stru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(g_tsg_para.proto_flag&(1<<PROTO_SSH)) //ssh
|
||||||
|
{
|
||||||
|
ret = ssh_protocol_identify((unsigned char *)a_stream->ptcpdetail->pdata, (unsigned int)a_stream->ptcpdetail->datalen,g_tsg_para.logger);
|
||||||
|
if(ret > 0)
|
||||||
|
{
|
||||||
|
context->proto=PROTO_SSH;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case STREAM_TYPE_UDP:
|
case STREAM_TYPE_UDP:
|
||||||
if(g_tsg_para.proto_flag&(1<<PROTO_DNS)) //dns
|
if(g_tsg_para.proto_flag&(1<<PROTO_DNS)) //dns
|
||||||
@@ -1249,16 +1259,6 @@ static int identify_application_protocol(const struct streaminfo *a_stream, stru
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_tsg_para.proto_flag&(1<<PROTO_SSH)) //ssh
|
|
||||||
{
|
|
||||||
ret = ssh_protocol_identify((unsigned char *)a_stream->ptcpdetail->pdata, (unsigned int)a_stream->ptcpdetail->datalen,g_tsg_para.logger);
|
|
||||||
if(ret > 0)
|
|
||||||
{
|
|
||||||
context->proto=PROTO_SSH;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(g_tsg_para.proto_flag&(1<<PROTO_QUIC)) //quic
|
if(g_tsg_para.proto_flag&(1<<PROTO_QUIC)) //quic
|
||||||
{
|
{
|
||||||
@@ -1824,7 +1824,7 @@ extern "C" int TSG_MASTER_INIT()
|
|||||||
MESA_load_profile_int_def(tsg_conffile, "SYSTEM","DEFAULT_POLICY_SWITCH", &g_tsg_para.default_compile_switch, 0);
|
MESA_load_profile_int_def(tsg_conffile, "SYSTEM","DEFAULT_POLICY_SWITCH", &g_tsg_para.default_compile_switch, 0);
|
||||||
MESA_load_profile_int_def(tsg_conffile, "SYSTEM","HIT_PATH_SWITCH", &g_tsg_para.hit_path_switch, 0);
|
MESA_load_profile_int_def(tsg_conffile, "SYSTEM","HIT_PATH_SWITCH", &g_tsg_para.hit_path_switch, 0);
|
||||||
|
|
||||||
MESA_load_profile_string_def(tsg_conffile, "SYSTEM", "IDENTIFY_PROTO_NAME", identify_proto_name, sizeof(identify_proto_name), "HTTP;SSL;DNS;FTP;BGP;SIP;MAIL;STREAMING_MEDIA;QUIC;SIP;");
|
MESA_load_profile_string_def(tsg_conffile, "SYSTEM", "IDENTIFY_PROTO_NAME", identify_proto_name, sizeof(identify_proto_name), "HTTP;SSL;DNS;FTP;BGP;SIP;MAIL;STREAMING_MEDIA;QUIC;SIP;SSH;");
|
||||||
tsg_proto_name2flag(identify_proto_name, &g_tsg_para.proto_flag);
|
tsg_proto_name2flag(identify_proto_name, &g_tsg_para.proto_flag);
|
||||||
|
|
||||||
MESA_load_profile_int_def(tsg_conffile, "SYSTEM", "DATACENTER_ID", &g_tsg_para.datacenter_id, 0);
|
MESA_load_profile_int_def(tsg_conffile, "SYSTEM", "DATACENTER_ID", &g_tsg_para.datacenter_id, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user