From: Victor Julien Date: Tue, 18 Apr 2023 11:48:46 +0000 (+0200) Subject: stream: check debug check for multi-SYN/ACK in TFO X-Git-Tag: suricata-7.0.0-rc2~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89c947129dff0e197359f94c3a8d9105d11bad62;p=thirdparty%2Fsuricata.git stream: check debug check for multi-SYN/ACK in TFO --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 4927d92011..cc516c2a1b 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -1624,7 +1624,10 @@ static void TcpStateQueueInitFromPktSynAck(const Packet *p, TcpStateQueue *q) { #if defined(DEBUG_VALIDATION) || defined(DEBUG) const TcpSession *ssn = p->flow->protoctx; - BUG_ON(ssn->state != TCP_SYN_SENT); + if ((ssn->flags & STREAMTCP_FLAG_TCP_FAST_OPEN) == 0) + BUG_ON(ssn->state != TCP_SYN_SENT); + else + BUG_ON(ssn->state != TCP_ESTABLISHED); #endif memset(q, 0, sizeof(*q));