diff options
author | Luca Deri <deri@ntop.org> | 2015-10-26 13:43:38 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2015-10-26 13:43:38 +0100 |
commit | fc6980e0c9f4b9b34811830c2bf7084c251b30a0 (patch) | |
tree | 99af94ff7afe09854bea1582b7439147f70a3c99 /src | |
parent | 7a95a21e098ce8d73479f0a3d0753b60e312fa20 (diff) |
Fix for #86
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 14 | ||||
-rw-r--r-- | src/lib/protocols/skype.c | 3 | ||||
-rw-r--r-- | src/lib/protocols/tcp_udp.c | 3 |
3 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index e9fbeb49d..16a956d4f 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -2061,9 +2061,6 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n /* HTTP */ init_http_dissector(ndpi_struct, &a, detection_bitmask); - /* SKYPE */ - init_skype_dissector(ndpi_struct, &a, detection_bitmask); - /* Stracraft */ init_starcraft_dissector(ndpi_struct, &a, detection_bitmask); @@ -2088,9 +2085,6 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n /* HEP */ init_hep_dissector(ndpi_struct, &a, detection_bitmask); - /* BITTORRENT */ - init_bittorrent_dissector(ndpi_struct, &a, detection_bitmask); - /* Teredo */ init_teredo_dissector(ndpi_struct, &a, detection_bitmask); @@ -2463,6 +2457,14 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n /* UBNTAC2 */ init_ubntac2_dissector(ndpi_struct, &a, detection_bitmask); + /* Put false-positive sensitive protocols at the end */ + + /* SKYPE */ + init_skype_dissector(ndpi_struct, &a, detection_bitmask); + + /* BITTORRENT */ + init_bittorrent_dissector(ndpi_struct, &a, detection_bitmask); + /* ----------------------------------------------------------------- */ diff --git a/src/lib/protocols/skype.c b/src/lib/protocols/skype.c index e3bd00332..da36d40bf 100644 --- a/src/lib/protocols/skype.c +++ b/src/lib/protocols/skype.c @@ -55,6 +55,9 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s // const u_int8_t *packet_payload = packet->payload; u_int32_t payload_len = packet->payload_packet_len; + if(flow->host_server_name[0] != '\0') + return; + /* Skype AS8220 212.161.8.0/24 diff --git a/src/lib/protocols/tcp_udp.c b/src/lib/protocols/tcp_udp.c index 7ca276dca..de9700e4a 100644 --- a/src/lib/protocols/tcp_udp.c +++ b/src/lib/protocols/tcp_udp.c @@ -48,6 +48,9 @@ void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, st u_int proto; struct ndpi_packet_struct *packet = &flow->packet; + if(flow->host_server_name[0] != '\0') + return; + if(ndpi_is_tor_flow(ndpi_struct, flow)) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TOR, NDPI_PROTOCOL_UNKNOWN); return; |