Improved heuristics
Used the host guessed protocol if upper protocol has not been detected
This commit is contained in:
@@ -5179,6 +5179,15 @@ void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
if(upper_detected_protocol == lower_detected_protocol)
|
||||
lower_detected_protocol = NDPI_PROTOCOL_UNKNOWN;
|
||||
|
||||
if((upper_detected_protocol != NDPI_PROTOCOL_UNKNOWN)
|
||||
&& (lower_detected_protocol == NDPI_PROTOCOL_UNKNOWN)) {
|
||||
if((flow->guessed_host_protocol_id != NDPI_PROTOCOL_UNKNOWN)
|
||||
&& (upper_detected_protocol != flow->guessed_host_protocol_id)) {
|
||||
lower_detected_protocol = upper_detected_protocol;
|
||||
upper_detected_protocol = flow->guessed_host_protocol_id;
|
||||
}
|
||||
}
|
||||
|
||||
ndpi_int_change_flow_protocol(ndpi_struct, flow,
|
||||
upper_detected_protocol, lower_detected_protocol);
|
||||
ndpi_int_change_packet_protocol(ndpi_struct, flow,
|
||||
|
||||
Reference in New Issue
Block a user