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:
Ivan Nardi
2021-10-03 21:38:49 +02:00
committed by GitHub
parent e84da386c7
commit bc5be1e76c
13 changed files with 20 additions and 70 deletions
+1 -5
View File
@@ -84,15 +84,11 @@ static void ndpi_check_zmq(struct ndpi_detection_module_struct *ndpi_struct, str
}
void ndpi_search_zmq(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 ZMQ\n");
/* skip marked packets */
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_ZMQ) {
if(packet->tcp && packet->tcp_retransmission == 0) {
ndpi_check_zmq(ndpi_struct, flow);
}
ndpi_check_zmq(ndpi_struct, flow);
}
}