]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: app-event list in engine
authorVictor Julien <victor@inliniac.net>
Sat, 15 Oct 2016 16:54:02 +0000 (18:54 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 16 Feb 2017 09:35:37 +0000 (10:35 +0100)
src/detect-app-layer-event.c
src/detect-engine.c

index 3447ab3813e51b0d76e373be050e5f2777182c6d..38504c14b67a2f68dbc4eb95beede363b40c27d6 100644 (file)
@@ -88,14 +88,13 @@ void DetectAppLayerEventRegister(void)
 
 static int DetectEngineAptEventInspect(ThreadVars *tv,
         DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
-        const Signature *s, const SigMatch *smi,
+        const Signature *s, const SigMatch *sm,
         Flow *f, uint8_t flags, void *alstate,
         void *tx, uint64_t tx_id)
 {
     AppLayerDecoderEvents *decoder_events = NULL;
     int r = 0;
     AppProto alproto;
-    SigMatch *sm;
     DetectAppLayerEventData *aled = NULL;
 
     alproto = f->alproto;
@@ -103,7 +102,7 @@ static int DetectEngineAptEventInspect(ThreadVars *tv,
     if (decoder_events == NULL)
         goto end;
 
-    for (sm = s->sm_lists[DETECT_SM_LIST_APP_EVENT]; sm != NULL; sm = sm->next) {
+    for ( ; sm != NULL; sm = sm->next) {
         aled = (DetectAppLayerEventData *)sm->ctx;
         KEYWORD_PROFILING_START;
         if (AppLayerDecoderEventsIsEventSet(decoder_events, aled->event_id)) {
index 40d32d3ad3488007a609e1b30c75994e48e7c3f3..476e6c26f11703708abadcf1c0ed2f7c7ad118e8 100644 (file)
@@ -198,6 +198,8 @@ int DetectEngineAppInspectionEngine2Signature(Signature *s)
             case DETECT_SM_LIST_TLSSUBJECT_MATCH:
             //case DETECT_SM_LIST_TLSVALIDITY_MATCH:
 
+            case DETECT_SM_LIST_APP_EVENT:
+
                 new_engine->sm = s->sm_lists[new_engine->sm_list];
                 s->sm_lists[new_engine->sm_list] = NULL;
                 s->sm_lists_tail[new_engine->sm_list] = NULL;