From 3570ec6f6e11f49d9ac79f6a756631dfa2c9aef0 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 26 Sep 2022 17:14:39 +0200 Subject: [PATCH] stream: fix reachable assertion Fix `Flow::thread_id` not always getting properly set up, leading to a reachable assertion. Bug #4582. (cherry picked from commit b06c0579f568226721f38f6a964bdffdfd1791fc) --- src/stream-tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 265da1ff90..4f4024585a 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -4850,8 +4850,6 @@ int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt, SCLogDebug("p->pcap_cnt %"PRIu64, p->pcap_cnt); - HandleThreadId(tv, p, stt); - TcpSession *ssn = (TcpSession *)p->flow->protoctx; /* track TCP flags */ @@ -5275,6 +5273,8 @@ TmEcode StreamTcp (ThreadVars *tv, Packet *p, void *data, PacketQueueNoLock *pq) return TM_ECODE_OK; } + HandleThreadId(tv, p, stt); + /* only TCP packets with a flow from here */ if (!(p->flags & PKT_PSEUDO_STREAM_END)) { -- 2.47.2