Fixes #83. Critical fix: due to an invalid endianess conversion some protocol were not properly indetified

This commit is contained in:
Luca Deri
2015-08-26 16:09:24 +02:00
parent 591d6df489
commit 19e96f7dd2
7 changed files with 52 additions and 45 deletions
+2 -2
View File
@@ -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)