]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: don't set conflicting packet/flow actions
authorVictor Julien <vjulien@oisf.net>
Fri, 11 Apr 2025 04:45:40 +0000 (06:45 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Apr 2025 06:22:10 +0000 (08:22 +0200)
commit1643b017b662ff8c5abc10847db016d50add6759
tree8e02f4cd0d1e21bb96b88d53d29556c9c11e84b9
parentd6e61b66906e220fd95832a3bc5fc9ae386bb856
detect: don't set conflicting packet/flow actions

If for the same a packet a drop rule and a pass rule would match,
the applying of actions could be contradictionary:

- the drop would be applied to the packet
- the pass rule would also be considered, not overriding the drop,
  but still setting the flow pass flag.

This would lead to the packet being dropped, but the rest of the
flow getting passed, including retransmissions of the dropped
packet.

This patch only sets drop/pass actions if no conflicting action
has been set on the packet before. It respects the action-order.

Bug: #7653.
src/detect-engine-alert.c