Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect: remove unnecessary detect thread flags stores #11357

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading