From 89c947129dff0e197359f94c3a8d9105d11bad62 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 18 Apr 2023 13:48:46 +0200 Subject: [PATCH] stream: check debug check for multi-SYN/ACK in TFO --- src/stream-tcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); -- 2.47.2