diff options
author | Luca Deri <deri@ntop.org> | 2018-05-14 21:40:27 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2018-05-14 21:40:27 +0200 |
commit | 1076455c01bfcfa51b24ff8d681e65fd00047dbd (patch) | |
tree | 1ffe59c0ae57a55499cece7a2131431bdcf6eea2 /src/lib/protocols/mdns.c | |
parent | 2d486aeed8e6450cc8034d6244848297bdefc31e (diff) |
Added ndpi_set_detection_preferences() APi call
Diffstat (limited to 'src/lib/protocols/mdns.c')
-rw-r--r-- | src/lib/protocols/mdns.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/protocols/mdns.c b/src/lib/protocols/mdns.c index aa3c3f525..17a6d921d 100644 --- a/src/lib/protocols/mdns.c +++ b/src/lib/protocols/mdns.c @@ -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; } |