fw: allow pass as a secondary action only for accept

Previously, hook sequences in both rules and default policies
allowed `pass` to be combined with incompatible hooks (e.g.
reject or drop).

This commit clamps pass to accept only.

Ticket: 8955
(cherry picked from commit d6521adf4e)
pull/16202/head
Lukas Sismis 2 weeks ago committed by Victor Julien
parent 610ecdb725
commit 7b0fd8158b

@ -1651,6 +1651,10 @@ static int SigParseActionDo(const char *action_in, const int idx, const bool fw_
"rules");
return -1;
}
if (idx > 0 && (flags & ACTION_PASS) && !(*action_out & ACTION_ACCEPT)) {
SCLogError("'pass' is only supported as a secondary action for 'accept'");
return -1;
}
}
/* parse scope, if any */

Loading…
Cancel
Save