From dc814aa595fbddc3d33ef4b4989810ebb20be913 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 5 Jan 2024 12:35:45 +0100 Subject: [PATCH] detect/frame: set frame flag during init Allows for quickly checking if sig operates on frames during parsing. --- src/detect-frame.c | 1 + src/detect.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/detect-frame.c b/src/detect-frame.c index ef9055d599..c83cc8f421 100644 --- a/src/detect-frame.c +++ b/src/detect-frame.c @@ -144,6 +144,7 @@ static int DetectFrameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *s return -1; FrameConfigEnable(keyword_alproto, frame_type); + s->init_data->init_flags |= SIG_FLAG_INIT_FRAME; return 0; } diff --git a/src/detect.h b/src/detect.h index f063da047c..77a657594b 100644 --- a/src/detect.h +++ b/src/detect.h @@ -292,6 +292,7 @@ typedef struct DetectPort_ { #define SIG_FLAG_INIT_BIDIREC BIT_U32(3) /**< signature has bidirectional operator */ #define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN \ BIT_U32(4) /** < signature has seen the first ip_proto keyword */ +#define SIG_FLAG_INIT_FRAME BIT_U32(5) /**< signature uses frames */ #define SIG_FLAG_INIT_STATE_MATCH BIT_U32(6) /**< signature has matches that require stateful inspection */ #define SIG_FLAG_INIT_NEED_FLUSH BIT_U32(7) #define SIG_FLAG_INIT_PRIO_EXPLICIT \