Added ndpi_set_detection_preferences() APi call

This commit is contained in:
Luca Deri
2018-05-14 21:40:27 +02:00
parent 2d486aeed8
commit 1076455c01
15 changed files with 173 additions and 89 deletions
+6 -4
View File
@@ -86,10 +86,12 @@ static int ndpi_int_check_mdns_payload(struct ndpi_detection_module_struct
/* printf("==> [%d] %s\n", j, answer); */
len = ndpi_min(sizeof(flow->protos.mdns.answer)-1, j);
strncpy(flow->protos.mdns.answer, (const char *)answer, len);
flow->protos.mdns.answer[len] = '\0';
if(!ndpi_struct->disable_metadata_export) {
len = ndpi_min(sizeof(flow->protos.mdns.answer)-1, j);
strncpy(flow->protos.mdns.answer, (const char *)answer, len);
flow->protos.mdns.answer[len] = '\0';
}
NDPI_LOG_INFO(ndpi_struct, "found MDNS with answer query\n");
return 1;
}