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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user