Implemented ndpi_process_partial_detection() API call to handle partial matches due to the nDPI specified configuration

This commit is contained in:
Luca Deri
2019-04-01 12:30:51 +02:00
parent c496c7975f
commit 1915a63cf2
5 changed files with 149 additions and 83 deletions
+4 -2
View File
@@ -153,8 +153,10 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|| ((dns_header.authority_rrs > 0) && (dns_header.authority_rrs <= NDPI_MAX_DNS_REQUESTS))
|| ((dns_header.additional_rrs > 0) && (dns_header.additional_rrs <= NDPI_MAX_DNS_REQUESTS)))
) {
/* This is a good reply */
if(ndpi_struct->dns_dont_dissect_response == 0) {
/* This is a good reply: we dissect it both for request and response */
/* Leave the statement below commented necessary in case of call to ndpi_get_partial_detection() */
/* if(ndpi_struct->dns_dont_dissect_response == 0) */ {
x++;
if(flow->packet.payload[x] != '\0') {
+3 -1
View File
@@ -157,7 +157,9 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
}
#endif
if(!ndpi_struct->http_dont_dissect_response) {
/* Leave the statement below commented necessary in case of call to ndpi_get_partial_detection() */
/* if(!ndpi_struct->http_dont_dissect_response) */ {
if((flow->http.url == NULL)
&& (packet->http_url_name.len > 0)
&& (packet->host_line.len > 0)) {