detect mpm: remove unused mpm flags

pull/1980/head
Victor Julien 10 years ago
parent a7d126738a
commit 7c94077892

@ -1386,20 +1386,15 @@ void MpmStoreSetup(const DetectEngineCtx *de_ctx, MpmStore *ms)
/* tell matcher we are inspecting packet */ /* tell matcher we are inspecting packet */
/* TODO remove! */ /* TODO remove! */
if (!(ms->buffer == MPMB_TCP_STREAM_TC || ms->buffer == MPMB_TCP_STREAM_TS)) { if (!(ms->buffer == MPMB_TCP_STREAM_TC || ms->buffer == MPMB_TCP_STREAM_TS)) {
s->flags |= SIG_FLAG_MPM_PACKET;
s->mpm_pattern_id_div_8 = cd->id / 8; s->mpm_pattern_id_div_8 = cd->id / 8;
s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8); s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8);
} else { } else {
/* tell matcher we are inspecting stream */
s->flags |= SIG_FLAG_MPM_STREAM;
s->mpm_pattern_id_div_8 = cd->id / 8; s->mpm_pattern_id_div_8 = cd->id / 8;
s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8); s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8);
} }
} else { } else {
/* tell matcher we are inspecting app-layer */
s->mpm_pattern_id_div_8 = cd->id / 8; s->mpm_pattern_id_div_8 = cd->id / 8;
s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8); s->mpm_pattern_id_mod_8 = 1 << (cd->id % 8);
s->flags |= SIG_FLAG_MPM_APPLAYER;
} }
} }
} }

@ -258,9 +258,6 @@ typedef struct DetectPort_ {
#define SIG_FLAG_REQUIRE_STREAM (1<<10) /**< signature is requiring stream match */ #define SIG_FLAG_REQUIRE_STREAM (1<<10) /**< signature is requiring stream match */
#define SIG_FLAG_MPM_NEG (1<<11) #define SIG_FLAG_MPM_NEG (1<<11)
#define SIG_FLAG_MPM_PACKET (1<<12)
#define SIG_FLAG_MPM_STREAM (1<<13)
#define SIG_FLAG_MPM_APPLAYER (1<<14)
#define SIG_FLAG_REQUIRE_FLOWVAR (1<<17) /**< signature can only match if a flowbit, flowvar or flowint is available. */ #define SIG_FLAG_REQUIRE_FLOWVAR (1<<17) /**< signature can only match if a flowbit, flowvar or flowint is available. */

Loading…
Cancel
Save