Fix how some protocols handle tcp retransmissions (#1321)
Most (all?) protocols don't care about (tcp) retransmissions. If a protocol registers itself with a NDPI_SELECTION_BITMASK_PROTOCOL_*_WITHOUT_RETRANSMISSION value, its callback is never triggered with a retransmitted packet.
This commit is contained in:
@@ -119,18 +119,14 @@ static void ndpi_check_socks5(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
void ndpi_search_socks(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search SOCKS\n");
|
||||
|
||||
/* skip marked packets */
|
||||
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_SOCKS) {
|
||||
if(packet->tcp_retransmission == 0) {
|
||||
ndpi_check_socks4(ndpi_struct, flow);
|
||||
ndpi_check_socks4(ndpi_struct, flow);
|
||||
|
||||
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_SOCKS)
|
||||
ndpi_check_socks5(ndpi_struct, flow);
|
||||
}
|
||||
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_SOCKS)
|
||||
ndpi_check_socks5(ndpi_struct, flow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user