Improvements for DNS continuous flow dissection
This commit is contained in:
@@ -201,7 +201,7 @@ static int search_valid_dns(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
if((flow->packet.detected_protocol_stack[0] == NDPI_PROTOCOL_DNS)
|
||||
|| (flow->packet.detected_protocol_stack[1] == NDPI_PROTOCOL_DNS)) {
|
||||
/* Request already set the protocol */
|
||||
flow->extra_packets_func = NULL; /* We're good now */
|
||||
// flow->extra_packets_func = NULL; /* Removed so the caller can keep dissecting DNS flows */
|
||||
} else {
|
||||
/* We missed the request */
|
||||
u_int16_t s_port = flow->packet.udp ? ntohs(flow->packet.udp->source) : ntohs(flow->packet.tcp->source);
|
||||
@@ -224,12 +224,6 @@ static int search_dns_again(struct ndpi_detection_module_struct *ndpi_struct, st
|
||||
/* possibly dissect the DNS reply */
|
||||
ndpi_search_dns(ndpi_struct, flow);
|
||||
|
||||
if(flow->protos.dns.num_answers > 0) {
|
||||
/* stop extra processing */
|
||||
flow->extra_packets_func = NULL; /* We're good now */
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* Possibly more processing */
|
||||
return(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user