diff options
author | Luca Deri <deri@ntop.org> | 2019-07-27 17:24:32 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-07-27 17:24:32 +0200 |
commit | 3e044a759be3b1b298aa4d9e68fc73a5c76182c5 (patch) | |
tree | 457f2165b4489c43bbb457efbc86737234d8aaa7 /src/lib/protocols/tor.c | |
parent | 5c38e7b126fdfcdd76a777bfce62c054c322b1e4 (diff) |
Code cleanup
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"); |