]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove STREAM_FLUSH
authorEric Leblond <el@stamus-networks.com>
Fri, 20 Jan 2023 10:08:11 +0000 (11:08 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 31 Mar 2023 17:30:06 +0000 (19:30 +0200)
It is unused in the code so can be removed.

Ticket: #5799

rust/src/core.rs
src/detect.c

index 64a6c843d0923092615a1d6bcae55463901d410a..3f892bf528da14d35c7f5debbef95564dff41c95 100644 (file)
@@ -38,7 +38,6 @@ pub const STREAM_TOCLIENT: u8 = 0x08;
 pub const STREAM_GAP:      u8 = 0x10;
 pub const STREAM_DEPTH:    u8 = 0x20;
 pub const STREAM_MIDSTREAM:u8 = 0x40;
-pub const STREAM_FLUSH:    u8 = 0x80;
 pub const DIR_BOTH:        u8 = 0b0000_1100;
 const DIR_TOSERVER:        u8 = 0b0000_0100;
 const DIR_TOCLIENT:        u8 = 0b0000_1000;
index e195570877ede858592b3516d0cf2e3817095b10..2dbbdc0c45742a9b356395c253c6831a91605add 100644 (file)
@@ -898,7 +898,6 @@ static DetectRunScratchpad DetectRunSetup(
             if (p->proto == IPPROTO_TCP && pflow->protoctx &&
                     StreamReassembleRawHasDataReady(pflow->protoctx, p)) {
                 p->flags |= PKT_DETECT_HAS_STREAMDATA;
-                flow_flags |= STREAM_FLUSH;
             }
             SCLogDebug("alproto %u", alproto);
         } else {
@@ -1078,12 +1077,7 @@ static bool DetectRunTxInspectRule(ThreadVars *tv,
     bool mpm_before_progress = false;   // is mpm engine before progress?
     bool mpm_in_progress = false;       // is mpm engine in a buffer we will revisit?
 
-    /* see if we want to pass on the FLUSH flag */
-    if ((s->flags & SIG_FLAG_FLUSH) == 0)
-        flow_flags &=~ STREAM_FLUSH;
-
     TRACE_SID_TXS(s->id, tx, "starting %s", direction ? "toclient" : "toserver");
-    TRACE_SID_TXS(s->id, tx, "FLUSH? %s", (flow_flags & STREAM_FLUSH)?"true":"false");
 
     /* for a new inspection we inspect pkt header and packet matches */
     if (likely(stored_flags == NULL)) {