From: Victor Julien Date: Mon, 26 Sep 2022 15:14:39 +0000 (+0200) Subject: stream: fix reachable assertion X-Git-Tag: suricata-7.0.0-beta1~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7934%2Fhead;p=thirdparty%2Fsuricata.git stream: fix reachable assertion Fix `Flow::thread_id` not always getting properly set up, leading to a reachable assertion. Bug #4582. --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index b9da110f10..e487d6796a 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -4941,8 +4941,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 */ @@ -5365,6 +5363,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)) {