aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2022-09-22 09:03:29 +0200
committerToni <matzeton@googlemail.com>2022-09-22 13:23:55 +0200
commit83de3e4716eb7dcc373f0fcad4b59e83ea140fb1 (patch)
treef2e0db01e54b6d50e8834dca65b8269421cb79e3 /src
parentb250f9d86c3356cee2757ea4c61d064fab53057c (diff)
DNS: change category of DNS flows
DNS flows should have `NDPI_PROTOCOL_CATEGORY_NETWORK` as category, regardless of the subprotocol (if any).
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_main.c1
-rw-r--r--src/lib/protocols/dns.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 9dd098653..173c98258 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -7641,6 +7641,7 @@ static int category_depends_on_master(int proto)
case NDPI_PROTOCOL_MAIL_POPS:
case NDPI_PROTOCOL_MAIL_SMTPS:
case NDPI_PROTOCOL_MAIL_IMAPS:
+ case NDPI_PROTOCOL_DNS:
return 1;
}
return 0;
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);