]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove unnecessary detect thread flags stores 11365/head
authorVictor Julien <vjulien@oisf.net>
Sun, 10 Sep 2023 06:21:02 +0000 (08:21 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 24 Jun 2024 20:30:13 +0000 (22:30 +0200)
src/detect-engine.c
src/detect.c
src/detect.h

index efb480f59088cd2789a60a8e518296246505e8d4..819fa04a39cd84a7d585fc06278969148eebf308 100644 (file)
@@ -1919,7 +1919,6 @@ static int DetectEngineInspectRulePayloadMatches(
         if (p->flags & PKT_DETECT_HAS_STREAMDATA) {
             pmatch = DetectEngineInspectStreamPayload(de_ctx, det_ctx, s, p->flow, p);
             if (pmatch) {
-                det_ctx->flags |= DETECT_ENGINE_THREAD_CTX_STREAM_CONTENT_MATCH;
                 *alert_flags |= PACKET_ALERT_FLAG_STREAM_MATCH;
             }
         }
index 440ede976736bf4c99946139c59bfd72833e47c9..5d6eb4df3e8a84bacfc0179fbc5e3c4cafa2e0aa 100644 (file)
@@ -825,8 +825,6 @@ next:
         DetectVarProcessList(det_ctx, pflow, p);
         DetectReplaceFree(det_ctx);
         RULE_PROFILING_END(det_ctx, s, smatch, p);
-
-        det_ctx->flags = 0;
         continue;
     }
 }
@@ -1731,7 +1729,6 @@ static void DetectRunFrames(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngin
                     DetectRunPostMatch(tv, det_ctx, p, s);
 
                     uint8_t alert_flags = (PACKET_ALERT_FLAG_STATE_MATCH | PACKET_ALERT_FLAG_FRAME);
-                    det_ctx->flags |= DETECT_ENGINE_THREAD_CTX_FRAME_ID_SET;
                     det_ctx->frame_id = frame->id;
                     SCLogDebug(
                             "%p/%" PRIi64 " sig %u (%u) matched", frame, frame->id, s->id, s->num);
index 26cff6352e6787004a76b4185004a22745b891ca..a4f15452328059f1522fc21a711d7efbcdc01828 100644 (file)
@@ -310,9 +310,6 @@ typedef struct DetectPort_ {
 /* for now a uint8_t is enough */
 #define SignatureMask uint8_t
 
-#define DETECT_ENGINE_THREAD_CTX_FRAME_ID_SET         0x0001
-#define DETECT_ENGINE_THREAD_CTX_STREAM_CONTENT_MATCH 0x0004
-
 #define FILE_SIG_NEED_FILE          0x01
 #define FILE_SIG_NEED_FILENAME      0x02
 #define FILE_SIG_NEED_MAGIC         0x04    /**< need the start of the file */
@@ -1180,8 +1177,6 @@ typedef struct DetectEngineThreadCtx_ {
         uint32_t *to_clear_queue;
     } multi_inspect;
 
-    uint16_t flags; /**< DETECT_ENGINE_THREAD_CTX_* flags */
-
     /* true if tx_id is set */
     bool tx_id_set;
     /** ID of the transaction currently being inspected. */