From: Victor Julien Date: Sat, 15 Oct 2022 08:48:15 +0000 (+0200) Subject: eve/alert: minor cleanups X-Git-Tag: suricata-7.0.0-beta1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d6212183b332cc170602a87d1e5873270bd2dc5;p=thirdparty%2Fsuricata.git eve/alert: minor cleanups --- diff --git a/src/output-json-alert.c b/src/output-json-alert.c index a6e40e3a4a..ed7e07e41e 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -348,12 +348,11 @@ void AlertJsonHeader(void *ctx, const Packet *p, const PacketAlert *pa, JsonBuil const char *action = "allowed"; /* use packet action if rate_filter modified the action */ if (unlikely(pa->flags & PACKET_ALERT_RATE_FILTER_MODIFIED)) { - if (PacketCheckAction( - p, (ACTION_DROP | ACTION_REJECT | ACTION_REJECT_DST | ACTION_REJECT_BOTH))) { + if (PacketCheckAction(p, ACTION_DROP_REJECT)) { action = "blocked"; } } else { - if (pa->action & (ACTION_REJECT|ACTION_REJECT_DST|ACTION_REJECT_BOTH)) { + if (pa->action & ACTION_REJECT_ANY) { action = "blocked"; } else if ((pa->action & ACTION_DROP) && EngineModeIsIPS()) { action = "blocked";