aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/bittorrent.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-01-17 11:38:39 +0100
committerGitHub <noreply@github.com>2023-01-17 11:38:39 +0100
commit470eaa6ff388435d7233ff2680e3ea013068d1fe (patch)
tree1351de4b75ed046ae3a136a1870fdf2a6fd983d0 /src/lib/protocols/bittorrent.c
parent29be01ef3a111fe467eb59876864574c168560df (diff)
Add Meraki Cloud protocol and improve other protocols (#1854)
Avoid some LineCall and Jabber false positives. Detect Discord mid flows. Fix Bittorrent detection.
Diffstat (limited to 'src/lib/protocols/bittorrent.c')
-rw-r--r--src/lib/protocols/bittorrent.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c
index c618ea905..cdb62e8db 100644
--- a/src/lib/protocols/bittorrent.c
+++ b/src/lib/protocols/bittorrent.c
@@ -454,6 +454,8 @@ static void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_str
struct ndpi_packet_struct *packet = &ndpi_struct->packet;
char *bt_proto = NULL;
+ NDPI_LOG_DBG(ndpi_struct, "Search bittorrent\n");
+
/* This is broadcast */
if(packet->iph) {
if((packet->iph->saddr == 0xFFFFFFFF) || (packet->iph->daddr == 0xFFFFFFFF))
@@ -491,7 +493,7 @@ static void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_str
wireshark/epan/dissectors/packet-bt-utp.c
*/
- if(packet->payload_packet_len >= 23 /* min header size */) {
+ if(packet->payload_packet_len >= 20 /* min header size */) {
if(
(strncmp((const char*)packet->payload, bt_search, strlen(bt_search)) == 0)
|| (strncmp((const char*)packet->payload, bt_search1, strlen(bt_search1)) == 0)