From 3ba8e2d3ea616ab3efdca6391bff3aa334bea94a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 13 Dec 2023 08:45:06 +0100 Subject: [PATCH] detect/byte: remove unneeded SIG_FLAG_APPLAYER sets Flag will be set during list(s) setup if needed. --- src/detect-byte-extract.c | 3 --- src/detect-bytemath.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/detect-byte-extract.c b/src/detect-byte-extract.c index 379d3dce01..117cce5975 100644 --- a/src/detect-byte-extract.c +++ b/src/detect-byte-extract.c @@ -563,7 +563,6 @@ static int DetectByteExtractSetup(DetectEngineCtx *de_ctx, Signature *s, const c if (DetectSignatureSetAppProto(s, ALPROTO_DCERPC) < 0) goto error; - s->flags |= SIG_FLAG_APPLAYER; } else if (data->flags & DETECT_BYTE_EXTRACT_FLAG_RELATIVE) { prev_pm = DetectGetLastSMFromLists(s, @@ -576,8 +575,6 @@ static int DetectByteExtractSetup(DetectEngineCtx *de_ctx, Signature *s, const c sm_list = SigMatchListSMBelongsTo(s, prev_pm); if (sm_list < 0) goto error; - if (sm_list != DETECT_SM_LIST_PMATCH) - s->flags |= SIG_FLAG_APPLAYER; } } else { diff --git a/src/detect-bytemath.c b/src/detect-bytemath.c index 8909085390..49c2989f7d 100644 --- a/src/detect-bytemath.c +++ b/src/detect-bytemath.c @@ -325,7 +325,6 @@ static int DetectByteMathSetup(DetectEngineCtx *de_ctx, Signature *s, const char if (DetectSignatureSetAppProto(s, ALPROTO_DCERPC) < 0) goto error; - s->flags |= SIG_FLAG_APPLAYER; } else if (data->flags & DETECT_BYTEMATH_FLAG_RELATIVE) { prev_pm = DetectGetLastSMFromLists(s, DETECT_CONTENT, DETECT_PCRE, @@ -338,8 +337,6 @@ static int DetectByteMathSetup(DetectEngineCtx *de_ctx, Signature *s, const char sm_list = SigMatchListSMBelongsTo(s, prev_pm); if (sm_list < 0) goto error; - if (sm_list != DETECT_SM_LIST_PMATCH) - s->flags |= SIG_FLAG_APPLAYER; } } else { -- 2.47.2