]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
events: reset logged event
authorPhilippe Antoine <contact@catenacyber.fr>
Tue, 31 May 2022 13:49:38 +0000 (15:49 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 2 Jul 2022 05:42:49 +0000 (07:42 +0200)
Otherwise, if we log a first app_layer_event, then reset
with AppLayerDecoderEventsResetEvents for a new packet,
then get another event, it does not get logged

Ticket: #5391
(cherry picked from commit b0298dd0468f150229f9021ebe9c438bc2b7cecf)

src/app-layer-events.c

index 6d1842df252074b93eb9bcf16755f7367979ba15..0fcb3ae01ed36cb6e9176e426181aec728666620 100644 (file)
@@ -140,8 +140,10 @@ void AppLayerDecoderEventsSetEvent(Flow *f, uint8_t event)
 
 void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events)
 {
-    if (events != NULL)
+    if (events != NULL) {
         events->cnt = 0;
+        events->event_last_logged = 0;
+    }
 }