diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-01-19 22:02:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 22:02:23 +0100 |
commit | 496b284c9888c090696cc8e570d0b20c08dc3d63 (patch) | |
tree | 15060a502b5ad321c3076e489c17501c764a004b /src | |
parent | c4274a4aecac5b86a575c48f4f3b6971c35bb8b8 (diff) |
Bittorrent: fix detection over TCP (#1868)
Close #1866
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/bittorrent.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index 64e46a4ed..40268cb90 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -154,8 +154,6 @@ static u_int8_t ndpi_int_search_bittorrent_tcp_zero(struct ndpi_detection_module u_int16_t a = 0; if(packet->payload_packet_len == 1 && packet->payload[0] == 0x13) { - /* reset stage back to 0 so we will see the next packet here too */ - flow->bittorrent_stage = 0; return 0; } @@ -418,17 +416,7 @@ static void ndpi_int_search_bittorrent_tcp(struct ndpi_detection_module_struct * return; } - if(flow->bittorrent_stage == 0 && packet->payload_packet_len != 0) { - /* exclude stage 0 detection from next run */ - flow->bittorrent_stage = 1; - if(ndpi_int_search_bittorrent_tcp_zero(ndpi_struct, flow) != 0) { - NDPI_LOG_DBG2(ndpi_struct, "stage 0 has detected something, returning\n"); - return; - } - - NDPI_LOG_DBG2(ndpi_struct, "stage 0 has no direct detection, fall through\n"); - } - return; + ndpi_int_search_bittorrent_tcp_zero(ndpi_struct, flow); } /* ************************************* */ |