diff options
Diffstat (limited to 'src/lib/protocols/tor.c')
-rw-r--r-- | src/lib/protocols/tor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/protocols/tor.c b/src/lib/protocols/tor.c index f1c6f586a..1a5d4097e 100644 --- a/src/lib/protocols/tor.c +++ b/src/lib/protocols/tor.c @@ -96,11 +96,12 @@ int ndpi_is_ssl_tor(struct ndpi_detection_module_struct *ndpi_struct, void ndpi_search_tor(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; - u_int16_t dport = 0, sport = 0; NDPI_LOG_DBG(ndpi_struct, "search for TOR\n"); if(packet->tcp != NULL) { + u_int16_t dport, sport; + sport = ntohs(packet->tcp->source), dport = ntohs(packet->tcp->dest); NDPI_LOG_DBG2(ndpi_struct, "calculating TOR over tcp\n"); |