]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve/drop: use highest priority drop 5976/head
authorVictor Julien <victor@inliniac.net>
Fri, 12 Mar 2021 09:22:01 +0000 (10:22 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 12 Mar 2021 11:59:27 +0000 (12:59 +0100)
When adding the alert to a drop record make sure the add the highest
priority.

It would until now add all drops from high to low prio, effectively
overwriting the record each time.

Ticket #4397

src/output-json-drop.c

index 9cdd23a2f844794a8b8e3dcb2a3c7caf7336d75f..3eb7e6832b056612975cf0d8584abb02d71fde49 100644 (file)
@@ -164,6 +164,7 @@ static int DropLogJSON (JsonDropLogThread *aft, const Packet *p)
             {
                 AlertJsonHeader(NULL, p, pa, js, 0, &addr);
                 logged = 1;
+                break;
             }
         }
         if (logged == 0) {