aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/dns.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2018-08-16 14:57:44 +0200
committerLuca Deri <deri@ntop.org>2018-08-16 14:57:44 +0200
commit01bf295a19c19dc4f521ee40f0c478c794e1b5e4 (patch)
tree7666d50e4e4407d82a05e7d9beb067ec4045ab3d /src/lib/protocols/dns.c
parentf88648fbc845eaf75a74f1c45a9483d144993e29 (diff)
Completed custom category implementation
Diffstat (limited to 'src/lib/protocols/dns.c')
-rw-r--r--src/lib/protocols/dns.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c
index 6ffa74a27..90be9544c 100644
--- a/src/lib/protocols/dns.c
+++ b/src/lib/protocols/dns.c
@@ -207,12 +207,16 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
flow->protos.dns.num_queries = (u_int8_t)dns_header.num_queries,
flow->protos.dns.num_answers = (u_int8_t) (dns_header.num_answers + dns_header.authority_rrs + dns_header.additional_rrs);
- if(j > 0)
+ if(j > 0) {
+ ndpi_protocol_match_result ret_match;
+
ndpi_match_host_subprotocol(ndpi_struct, flow,
(char *)flow->host_server_name,
strlen((const char*)flow->host_server_name),
+ &ret_match,
NDPI_PROTOCOL_DNS);
-
+ }
+
#ifdef DNS_DEBUG
NDPI_LOG_DBG2(ndpi_struct, "[num_queries=%d][num_answers=%d][reply_code=%u][rsp_type=%u][host_server_name=%s]\n",
flow->protos.dns.num_queries, flow->protos.dns.num_answers,