]> git.ipfire.org Git - thirdparty/suricata.git/commit
stream: tcp: Handle retransmitted SYN with TSval 7531/head
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 11 Mar 2022 11:08:10 +0000 (11:08 +0000)
committerVictor Julien <vjulien@oisf.net>
Mon, 13 Jun 2022 06:04:04 +0000 (08:04 +0200)
commitf50af12068d0af529acdaa4e45f0d4acc8c372d1
tree28e7015845b5ecf4f76ce4a9d89277ae7e2a69ed
parent8109b0017e6e76c41d2ab54129f18188888eb7f5
stream: tcp: Handle retransmitted SYN with TSval

For connections that use TCP timestamps for which the first SYN packet
does not reach the server, any replies to retransmitted SYNs will be
tropped.

This is happening in StateSynSentValidateTimestamp, where the timestamp
value in a SYN-ACK packet must match the one from the SYN packet.
However, since the server never received the first SYN packet, it will
respond with an updated timestamp from any of the following SYN packets.

The timestamp value inside suricata is not being updated at any time
which should happen. This patch fixes that problem.

Bug: #4376.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/stream-tcp.c