]> 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 <vjulien@oisf.net>
Fri, 11 Apr 2025 15:16:24 +0000 (17:16 +0200)
commit57b17fb3b2fb22d4aa88807fda34456f0edc414c
tree39f1f3010f8109c44b7dd51bb2d387d683c47b0f
parent2fc7741a8e72fff95df030313183ab5fab36f2d8
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