]> 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>
Mon, 13 Jun 2022 05:59:41 +0000 (07:59 +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

src/app-layer-events.c

index 8b14f361f408198efb477f109fce44a7ea48d418..65016e2eaedbe94e3073815633234b0768a7cc85 100644 (file)
@@ -122,8 +122,10 @@ void AppLayerDecoderEventsSetEventRaw(AppLayerDecoderEvents **sevents, uint8_t e
 
 void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events)
 {
-    if (events != NULL)
+    if (events != NULL) {
         events->cnt = 0;
+        events->event_last_logged = 0;
+    }
 }