Reworked the STUN plugin

Added support for WhatsApp Voice vs WhatsApp (chat, no voice)
This commit is contained in:
Luca
2015-06-04 18:44:09 +02:00
parent a31b0a3354
commit 4ce9dec54e
6 changed files with 219 additions and 181 deletions
+3
View File
@@ -975,6 +975,9 @@ static unsigned int packet_processing(u_int16_t thread_id,
|| ((proto == IPPROTO_TCP) && (flow->packets > 10))) {
flow->detection_completed = 1;
if((flow->detected_protocol == NDPI_PROTOCOL_UNKNOWN) && (ndpi_flow->num_stun_udp_pkts > 0))
ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN, NDPI_REAL_PROTOCOL);
snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s", flow->ndpi_flow->host_server_name);
if((proto == IPPROTO_TCP) && (flow->detected_protocol != NDPI_PROTOCOL_DNS)) {