From 83de3e4716eb7dcc373f0fcad4b59e83ea140fb1 Mon Sep 17 00:00:00 2001 From: Nardi Ivan Date: Thu, 22 Sep 2022 09:03:29 +0200 Subject: DNS: change category of DNS flows DNS flows should have `NDPI_PROTOCOL_CATEGORY_NETWORK` as category, regardless of the subprotocol (if any). --- src/lib/protocols/dns.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/protocols') diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c index e12ece12c..63b2f2a9d 100644 --- a/src/lib/protocols/dns.c +++ b/src/lib/protocols/dns.c @@ -535,8 +535,7 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st &ret_match, NDPI_PROTOCOL_DNS); - if(ret_match.protocol_category != NDPI_PROTOCOL_CATEGORY_UNSPECIFIED) - flow->category = ret_match.protocol_category; + /* Category is always NDPI_PROTOCOL_CATEGORY_NETWORK, regardless of the subprotocol */ if(ret.app_protocol == NDPI_PROTOCOL_UNKNOWN) ret.master_protocol = checkDNSSubprotocol(s_port, d_port); -- cgit v1.2.3