mirror of https://github.com/OISF/suricata
stream: fix spurious retransmission handling
Fix spurious retransmissions getting dropped, stalling connections in IPS mode. There are several reasons why benign spurious retransmissions can happen, with the most obvious one that an ACK is lost so the sender retransmits while the receiver has ACK'd it. If Suricata sees the ACK but afterwards it gets lost, we can get in this condition. Packet loss can have a wide range of causes here, including packets reaching a host but getting dropped in the NIC queue or kernel queues due to resource constraints. So these packets are no longer an "error" in this patch. Next to this, the accuracy of the spurious retransmission has been improved. Use SEQ macros to compare sequence numbers. Only use base_seq if reassembly is still enabled for a stream. A special case is added for cases where a segment is before last_ack but after base_seq, which can happen when protocol detection isn't finished yet. In this case the segment is tagged as spurious, but still processed. This way we can check for overlaps. Bug: #5875.pull/8562/head
parent
01b7ccc224
commit
a0f0a3b48b
Loading…
Reference in New Issue