]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
bypass: really bypass udp flow from first packet
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 30 May 2024 07:56:43 +0000 (09:56 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 4 Jul 2024 04:37:21 +0000 (06:37 +0200)
Ticket: 7053

As flow state would be overwritten by established...

src/flow.c

index e40a1ce7dd8074e637593ff70c9ae6adc5f21c7e..7bfa80ea0a9b56a58f7dc4a0f792811f8c643402 100644 (file)
@@ -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) {