From df5dcfef5f1d974779e653d2d1d8b3b5d83dc6fc Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 30 May 2024 09:56:43 +0200 Subject: [PATCH] bypass: really bypass udp flow from first packet Ticket: 7053 As flow state would be overwritten by established... --- src/flow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/flow.c b/src/flow.c index e40a1ce7dd80..7bfa80ea0a9b 100644 --- a/src/flow.c +++ b/src/flow.c @@ -482,7 +482,13 @@ void FlowHandlePacketUpdate(Flow *f, Packet *p, ThreadVars *tv, DecodeThreadVars SCLogDebug("pkt %p FLOW_PKT_ESTABLISHED", p); p->flowflags |= FLOW_PKT_ESTABLISHED; - FlowUpdateState(f, FLOW_STATE_ESTABLISHED); + if ( +#ifdef CAPTURE_OFFLOAD + (f->flow_state != FLOW_STATE_CAPTURE_BYPASSED) && +#endif + (f->flow_state != FLOW_STATE_LOCAL_BYPASSED)) { + FlowUpdateState(f, FLOW_STATE_ESTABLISHED); + } } if (f->flags & FLOW_ACTION_DROP) {