diff --git a/src/detect-parse.c b/src/detect-parse.c index 72116b50ad..1949282fba 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1385,17 +1385,17 @@ Signature *SigInit(DetectEngineCtx *de_ctx, char *sigstr) { } if (sig->sm_lists[DETECT_SM_LIST_UMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_DMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_AMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HCBDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HHDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HRHDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; SCLogDebug("sig %"PRIu32" SIG_FLAG_APPLAYER: %s, SIG_FLAG_PACKET: %s", sig->id, sig->flags & SIG_FLAG_APPLAYER ? "set" : "not set", @@ -1583,17 +1583,17 @@ Signature *SigInitReal(DetectEngineCtx *de_ctx, char *sigstr) { } if (sig->sm_lists[DETECT_SM_LIST_UMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_DMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_AMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HCBDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HHDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; if (sig->sm_lists[DETECT_SM_LIST_HRHDMATCH]) - sig->flags |= SIG_FLAG_AMATCH; + sig->flags |= SIG_FLAG_STATE_MATCH; SigBuildAddressMatchArray(sig); diff --git a/src/detect.c b/src/detect.c index 650ad263d8..8729d03811 100644 --- a/src/detect.c +++ b/src/detect.c @@ -730,7 +730,7 @@ static void SigMatchSignaturesBuildMatchArray(DetectEngineCtx *de_ctx, /* de_state check, filter out all signatures that already had a match before * or just partially match */ - if (s->flags & SIG_FLAG_AMATCH) { + if (s->flags & SIG_FLAG_STATE_MATCH) { /* we run after DeStateDetectContinueDetection, so we might have * state NEW here. In that case we'd want to continue detection * for this sig. If we have NOSTATE, stateful detection didn't @@ -1259,7 +1259,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh s->sm_lists[DETECT_SM_LIST_AMATCH], s->sm_lists[DETECT_SM_LIST_UMATCH], s->sm_lists[DETECT_SM_LIST_DMATCH]); /* consider stateful sig matches */ - if (s->flags & SIG_FLAG_AMATCH) { + if (s->flags & SIG_FLAG_STATE_MATCH) { if (alstate == NULL) { SCLogDebug("state matches but no state, we can't match"); goto next; diff --git a/src/detect.h b/src/detect.h index a0bcf27186..fb45ece324 100644 --- a/src/detect.h +++ b/src/detect.h @@ -231,7 +231,7 @@ typedef struct DetectPort_ { #define SIG_FLAG_PACKET 0x00020000 /**< signature has matches against a packet (as opposed to app layer) */ // 0x00040000 unused -#define SIG_FLAG_AMATCH 0x00080000 +#define SIG_FLAG_STATE_MATCH 0x00080000 /**< signature has matches that require stateful inspection */ // 0x00100000 unused // 0x00200000 unused // 0x00400000 unused