From: Jeff Lucovsky Date: Mon, 11 Mar 2024 18:58:07 +0000 (-0400) Subject: flow: Swap thread_ids X-Git-Tag: suricata-7.0.5~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=158018fc1c410e6aac70b4f080f61873769561cd;p=thirdparty%2Fsuricata.git flow: Swap thread_ids Issue: 6835 When swapping the flow's direction, also swap the thread_ids. This should help with the issues identified in https://redmine.openinfosecfoundation.org/issues/2725 (cherry picked from commit 3c5745978f85f4bf049e2892c8bda167f9e53033) --- diff --git a/src/flow.c b/src/flow.c index 9783b7883b..b61823efd0 100644 --- a/src/flow.c +++ b/src/flow.c @@ -291,6 +291,8 @@ void FlowSwap(Flow *f) FlowSwapFlags(f); FlowSwapFileFlags(f); + SWAP_VARS(FlowThreadId, f->thread_id[0], f->thread_id[1]); + if (f->proto == IPPROTO_TCP) { TcpStreamFlowSwap(f); }