aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/dns.c
diff options
context:
space:
mode:
authorMichele Campus <fci1908@gmail.com>2017-12-07 22:45:28 +0100
committerGitHub <noreply@github.com>2017-12-07 22:45:28 +0100
commitcb8f4f87bf332fc2cc0da1019dd8c5d57036a513 (patch)
treebfb4af5722039131c48d57183b6682c9e36859b6 /src/lib/protocols/dns.c
parent50645e11d8c65ce0a5030e8ab65db95637bd5839 (diff)
parentdfd8cbc4e195e3d29e67d04b96cd97d0aa0fc8df (diff)
Merge branch 'dev' into dev
Diffstat (limited to 'src/lib/protocols/dns.c')
-rw-r--r--src/lib/protocols/dns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c
index bf4f9d9b6..7b56c3c02 100644
--- a/src/lib/protocols/dns.c
+++ b/src/lib/protocols/dns.c
@@ -201,6 +201,9 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
off++;
}
+ if(is_query && ndpi_struct->dns_dissect_response)
+ return; /* The response will set the verdict */
+
flow->host_server_name[j] = '\0';
flow->protos.dns.num_queries = (u_int8_t)dns_header.num_queries,
@@ -220,9 +223,6 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
#endif
if(flow->packet.detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) {
- if(is_query && ndpi_struct->dns_dissect_response)
- return; /* The response will set the verdict */
-
/**
Do not set the protocol with DNS if ndpi_match_host_subprotocol() has
matched a subprotocol