diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-08-06 20:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 20:01:06 +0200 |
commit | 120e01566a32e1aa4c7c8179165d035c1864cfb3 (patch) | |
tree | 17e9e82c920bab59181d7853490e8a4c9ef3346a /src | |
parent | 1d4e27c4739f74ccef19fde7e6008d725ea93a69 (diff) |
Bittorrent: don't use absolute time reference (#1701)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/bittorrent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index e2ad3d2b4..ba88c01e5 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -522,7 +522,7 @@ static void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_str u_int32_t ts = ntohl(*((u_int32_t*)&(packet->payload[4]))); u_int32_t now; - now = (u_int32_t)time(NULL); + now = (u_int32_t)(packet->current_time_ms / 1000); if((ts < (now+86400)) && (ts > (now-86400))) { bt_proto = ndpi_strnstr((const char *)&packet->payload[20], BITTORRENT_PROTO_STRING, packet->payload_packet_len-20); |