From: Victor Julien Date: Wed, 13 Dec 2023 07:45:06 +0000 (+0100) Subject: detect/byte: remove unneeded SIG_FLAG_APPLAYER sets X-Git-Tag: suricata-8.0.0-beta1~1912 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba8e2d3ea616ab3efdca6391bff3aa334bea94a;p=thirdparty%2Fsuricata.git detect/byte: remove unneeded SIG_FLAG_APPLAYER sets Flag will be set during list(s) setup if needed. --- 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 {