json_object_set_new(js, "requirements", js_flags);
}
- if (s->flags & SIG_FLAG_STATE_MATCH) {
+ if (s->init_data->init_flags & SIG_FLAG_INIT_STATE_MATCH) {
json_t *js_array = json_array();
const DetectEngineAppInspectionEngine *app = s->app_inspect;
for ( ; app != NULL; app = app->next) {
SCLogDebug("sid %u: engine %p/%u added", s->id, new_engine, new_engine->id);
- s->flags |= SIG_FLAG_STATE_MATCH;
+ s->init_data->init_flags |= SIG_FLAG_INIT_STATE_MATCH;
next:
t = t->next;
}
- if ((s->flags & SIG_FLAG_STATE_MATCH) && s->init_data->smlists[DETECT_SM_LIST_PMATCH] != NULL) {
+ if ((s->init_data->init_flags & SIG_FLAG_INIT_STATE_MATCH) &&
+ s->init_data->smlists[DETECT_SM_LIST_PMATCH] != NULL)
+ {
/* if engine is added multiple times, we pass it the same list */
SigMatchData *stream = SigMatchList2DataArray(s->init_data->smlists[DETECT_SM_LIST_PMATCH]);
BUG_ON(stream == NULL);
SCLogDebug("GET flowbit %s/%u: SID %u", varname, i, s->id);
if (to_state) {
- s->flags |= SIG_FLAG_STATE_MATCH;
+ s->init_data->init_flags |= SIG_FLAG_INIT_STATE_MATCH;
SCLogDebug("made SID %u stateful because it depends on "
"stateful rules that set flowbit %s", s->id, varname);
}
SCLogDebug("inspecting signature id %"PRIu32"", s->id);
- if (sflags & SIG_FLAG_STATE_MATCH) {
- goto next; // TODO skip and handle in DetectRunTx
+ if (s->app_inspect != NULL) {
+ goto next; // handle sig in DetectRunTx
}
/* don't run mask check for stateful rules.
uint32_t x = array_idx;
for (uint32_t i = 0; i < det_ctx->match_array_cnt; i++) {
const Signature *s = det_ctx->match_array[i];
- if (s->flags & SIG_FLAG_STATE_MATCH) {
+ if (s->app_inspect != NULL) {
const SigIntId id = s->num;
det_ctx->tx_candidates[array_idx].s = s;
det_ctx->tx_candidates[array_idx].id = id;
#define SIG_FLAG_APPLAYER (1<<6) /**< signature applies to app layer instead of packets */
#define SIG_FLAG_IPONLY (1<<7) /**< ip only signature */
-#define SIG_FLAG_STATE_MATCH (1<<8) /**< signature has matches that require stateful inspection */
+// vacancy
#define SIG_FLAG_REQUIRE_PACKET (1<<9) /**< signature is requiring packet match */
#define SIG_FLAG_REQUIRE_STREAM (1<<10) /**< signature is requiring stream match */
#define SIG_FLAG_INIT_BIDIREC (1<<3) /**< signature has bidirectional operator */
#define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN (1<<4) /** < signature has seen the first ip_proto keyword */
#define SIG_FLAG_INIT_HAS_TRANSFORM (1<<5)
+#define SIG_FLAG_INIT_STATE_MATCH (1<<6) /**< signature has matches that require stateful inspection */
/* signature mask flags */
#define SIG_MASK_REQUIRE_PAYLOAD (1<<0)