diff options
author | Luca Deri <deri@ntop.org> | 2015-08-26 16:09:24 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2015-08-26 16:09:24 +0200 |
commit | 19e96f7dd2ea8a201614239b51fb32134c51352e (patch) | |
tree | 7d4828566b12275ebd4fbda44c62a1ff8f2f1a19 /src/lib/protocols | |
parent | 591d6df489a45c08d2c55a8ada6cede0d6af165a (diff) |
Fixes #83. Critical fix: due to an invalid endianess conversion some protocol were not properly indetified
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/skype.c | 4 | ||||
-rw-r--r-- | src/lib/protocols/tcp_udp.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/protocols/skype.c b/src/lib/protocols/skype.c index 7f201569c..e3bd00332 100644 --- a/src/lib/protocols/skype.c +++ b/src/lib/protocols/skype.c @@ -40,8 +40,8 @@ u_int8_t is_skype_flow(struct ndpi_detection_module_struct *ndpi_struct, Skype connections are identified by some SSL-like communications without SSL certificate being exchanged */ - if(is_skype_host(ndpi_struct, ntohl(packet->iph->saddr)) - || is_skype_host(ndpi_struct, ntohl(packet->iph->daddr))) { + if(is_skype_host(ndpi_struct, packet->iph->saddr) + || is_skype_host(ndpi_struct, packet->iph->daddr)) { return(1); } } diff --git a/src/lib/protocols/tcp_udp.c b/src/lib/protocols/tcp_udp.c index 1eb9c8773..7ca276dca 100644 --- a/src/lib/protocols/tcp_udp.c +++ b/src/lib/protocols/tcp_udp.c @@ -37,9 +37,9 @@ u_int ndpi_search_tcp_or_udp_raw(struct ndpi_detection_module_struct *ndpi_struc } } - if((rc = ndpi_host_ptree_match(ndpi_struct, saddr)) != NDPI_PROTOCOL_UNKNOWN) return(rc); + if((rc = ndpi_host_ptree_match(ndpi_struct, htonl(saddr))) != NDPI_PROTOCOL_UNKNOWN) return(rc); - return(ndpi_host_ptree_match(ndpi_struct, daddr)); + return(ndpi_host_ptree_match(ndpi_struct, htonl(daddr))); } void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) |