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: 8954
pull/16185/head
Lukas Sismis 2 months ago committed by Victor Julien
parent 4bafe61ecf
commit d6521adf4e

@ -1822,6 +1822,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