From 7896148798adcfc9efdc985651982103c71961f1 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 21 May 2025 12:15:03 +0200 Subject: [PATCH] detect/config: allow setting a scope for action config --- src/detect-parse.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/detect-parse.c b/src/detect-parse.c index 30ca1abdfb..bb304e2f7a 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1608,6 +1608,15 @@ static int SigParseAction(Signature *s, const char *action_in) return -1; } s->action_scope = scope_flags; + } else if (flags & (ACTION_CONFIG)) { + if (strcmp(o, "packet") == 0) { + scope_flags = (uint8_t)ACTION_SCOPE_PACKET; + } else { + SCLogError("invalid action scope '%s' in action '%s': only 'packet' allowed", o, + action_in); + return -1; + } + s->action_scope = scope_flags; } else { SCLogError("invalid action scope '%s' in action '%s': scope only supported for actions " "'drop', 'pass' and 'reject'",