Added NDPI_MIN_NUM_STUN_DETECTION constant

This commit is contained in:
Luca
2018-10-29 14:47:53 +01:00
parent ecdece83fe
commit 01444f79e1
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -332,6 +332,7 @@
#endif
#define NDPI_MAX_DNS_REQUESTS 16
#define NDPI_MIN_NUM_STUN_DETECTION 8
#define NDPI_MAJOR @NDPI_MAJOR@
#define NDPI_MINOR @NDPI_MINOR@
+1 -1
View File
@@ -3985,7 +3985,7 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
&& (flow->guessed_protocol_id == NDPI_PROTOCOL_STUN)) {
check_stun_export:
if(flow->protos.stun_ssl.stun.num_processed_pkts > 0) {
if(flow->protos.stun_ssl.stun.num_processed_pkts >= 8) {
if(flow->protos.stun_ssl.stun.num_processed_pkts >= NDPI_MIN_NUM_STUN_DETECTION) {
u_int16_t proto = (flow->protos.stun_ssl.stun.num_binding_requests < 4) ? NDPI_PROTOCOL_SKYPE_CALL_IN : NDPI_PROTOCOL_SKYPE_CALL_OUT;
ndpi_set_detected_protocol(ndpi_struct, flow, proto, NDPI_PROTOCOL_SKYPE);