Skip to content

Commit

Permalink
detect: remove unnecessary detect thread flags stores
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Jun 24, 2024
1 parent b34d4b1 commit ce727cf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/detect-engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,6 @@ static inline void DetectRulePacketRules(
DetectVarProcessList(det_ctx, pflow, p);
DetectReplaceFree(det_ctx);
RULE_PROFILING_END(det_ctx, s, smatch, p);

det_ctx->flags = 0;
continue;
}
}
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions src/detect.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit ce727cf

Please sign in to comment.