DNS: change category of DNS flows

DNS flows should have `NDPI_PROTOCOL_CATEGORY_NETWORK` as category,
regardless of the subprotocol (if any).
This commit is contained in:
Nardi Ivan
2022-09-22 13:23:55 +02:00
committed by Toni
parent b250f9d86c
commit 83de3e4716
31 changed files with 261 additions and 261 deletions
+1
View File
@@ -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;
+1 -2
View File
@@ -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);