From: Victor Julien Date: Fri, 23 Dec 2016 15:03:08 +0000 (+0100) Subject: detect: remove unused SIGMATCH_PAYLOAD flag X-Git-Tag: suricata-4.0.0-beta1~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfac5276b8a0a3089a43dbeb52d85d75ab4a7494;p=thirdparty%2Fsuricata.git detect: remove unused SIGMATCH_PAYLOAD flag --- diff --git a/src/detect-base64-decode.c b/src/detect-base64-decode.c index 5bac625e0f..354b85dd99 100644 --- a/src/detect-base64-decode.c +++ b/src/detect-base64-decode.c @@ -48,7 +48,6 @@ void DetectBase64DecodeRegister(void) sigmatch_table[DETECT_BASE64_DECODE].RegisterTests = DetectBase64DecodeRegisterTests; - sigmatch_table[DETECT_BASE64_DECODE].flags |= SIGMATCH_PAYLOAD; sigmatch_table[DETECT_BASE64_DECODE].flags |= SIGMATCH_OPTIONAL_OPT; DetectSetupParseRegexes(decode_pattern, &decode_pcre, &decode_pcre_study); diff --git a/src/detect-byte-extract.c b/src/detect-byte-extract.c index a6ab72a016..07f358367c 100644 --- a/src/detect-byte-extract.c +++ b/src/detect-byte-extract.c @@ -104,8 +104,6 @@ void DetectByteExtractRegister(void) sigmatch_table[DETECT_BYTE_EXTRACT].Free = DetectByteExtractFree; sigmatch_table[DETECT_BYTE_EXTRACT].RegisterTests = DetectByteExtractRegisterTests; - sigmatch_table[DETECT_BYTE_EXTRACT].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-bytejump.c b/src/detect-bytejump.c index e09e3f7b7c..872cd56b06 100644 --- a/src/detect-bytejump.c +++ b/src/detect-bytejump.c @@ -75,8 +75,6 @@ void DetectBytejumpRegister (void) sigmatch_table[DETECT_BYTEJUMP].Free = DetectBytejumpFree; sigmatch_table[DETECT_BYTEJUMP].RegisterTests = DetectBytejumpRegisterTests; - sigmatch_table[DETECT_BYTEJUMP].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-bytetest.c b/src/detect-bytetest.c index 49e58ad7d2..731ad6f4e6 100644 --- a/src/detect-bytetest.c +++ b/src/detect-bytetest.c @@ -76,8 +76,6 @@ void DetectBytetestRegister (void) sigmatch_table[DETECT_BYTETEST].Free = DetectBytetestFree; sigmatch_table[DETECT_BYTETEST].RegisterTests = DetectBytetestRegisterTests; - sigmatch_table[DETECT_BYTETEST].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-content.c b/src/detect-content.c index 42fb944738..64904b0168 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -59,8 +59,6 @@ void DetectContentRegister (void) sigmatch_table[DETECT_CONTENT].Setup = DetectContentSetup; sigmatch_table[DETECT_CONTENT].Free = DetectContentFree; sigmatch_table[DETECT_CONTENT].RegisterTests = DetectContentRegisterTests; - - sigmatch_table[DETECT_CONTENT].flags |= SIGMATCH_PAYLOAD; } /** diff --git a/src/detect-dce-iface.c b/src/detect-dce-iface.c index eec29b3e2d..50e7477401 100644 --- a/src/detect-dce-iface.c +++ b/src/detect-dce-iface.c @@ -78,8 +78,6 @@ void DetectDceIfaceRegister(void) sigmatch_table[DETECT_DCE_IFACE].Free = DetectDceIfaceFree; sigmatch_table[DETECT_DCE_IFACE].RegisterTests = DetectDceIfaceRegisterTests; - sigmatch_table[DETECT_DCE_IFACE].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); g_dce_generic_list_id = DetectBufferTypeRegister("dce_generic"); diff --git a/src/detect-dce-opnum.c b/src/detect-dce-opnum.c index f07c921dab..5417826ea0 100644 --- a/src/detect-dce-opnum.c +++ b/src/detect-dce-opnum.c @@ -73,8 +73,6 @@ void DetectDceOpnumRegister(void) sigmatch_table[DETECT_DCE_OPNUM].Free = DetectDceOpnumFree; sigmatch_table[DETECT_DCE_OPNUM].RegisterTests = DetectDceOpnumRegisterTests; - sigmatch_table[DETECT_DCE_OPNUM].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); g_dce_generic_list_id = DetectBufferTypeRegister("dce_generic"); diff --git a/src/detect-dce-stub-data.c b/src/detect-dce-stub-data.c index fa9788fd2a..6318e0dfc5 100644 --- a/src/detect-dce-stub-data.c +++ b/src/detect-dce-stub-data.c @@ -200,7 +200,6 @@ void DetectDceStubDataRegister(void) sigmatch_table[DETECT_DCE_STUB_DATA].RegisterTests = DetectDceStubDataRegisterTests; sigmatch_table[DETECT_DCE_STUB_DATA].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_DCE_STUB_DATA].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister(BUFFER_NAME, SIG_FLAG_TOSERVER, 2, PrefilterTxDceStubDataRequestRegister); diff --git a/src/detect-depth.c b/src/detect-depth.c index a78f8a1b96..18453178f9 100644 --- a/src/detect-depth.c +++ b/src/detect-depth.c @@ -51,8 +51,6 @@ void DetectDepthRegister (void) sigmatch_table[DETECT_DEPTH].Setup = DetectDepthSetup; sigmatch_table[DETECT_DEPTH].Free = NULL; sigmatch_table[DETECT_DEPTH].RegisterTests = NULL; - - sigmatch_table[DETECT_DEPTH].flags |= SIGMATCH_PAYLOAD; } static int DetectDepthSetup (DetectEngineCtx *de_ctx, Signature *s, char *depthstr) diff --git a/src/detect-distance.c b/src/detect-distance.c index c700675f4a..10f6528477 100644 --- a/src/detect-distance.c +++ b/src/detect-distance.c @@ -57,8 +57,6 @@ void DetectDistanceRegister(void) sigmatch_table[DETECT_DISTANCE].Setup = DetectDistanceSetup; sigmatch_table[DETECT_DISTANCE].Free = NULL; sigmatch_table[DETECT_DISTANCE].RegisterTests = DetectDistanceRegisterTests; - - sigmatch_table[DETECT_DISTANCE].flags |= SIGMATCH_PAYLOAD; } static int DetectDistanceSetup (DetectEngineCtx *de_ctx, Signature *s, diff --git a/src/detect-dnp3.c b/src/detect-dnp3.c index 4fe63ecd22..153e151f8e 100644 --- a/src/detect-dnp3.c +++ b/src/detect-dnp3.c @@ -543,7 +543,6 @@ static void DetectDNP3DataRegister(void) DetectDNP3DataRegisterTests; sigmatch_table[DETECT_AL_DNP3DATA].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_DNP3DATA].flags |= SIGMATCH_PAYLOAD; DetectAppLayerInspectEngineRegister("dnp3_data", ALPROTO_DNP3, SIG_FLAG_TOSERVER, diff --git a/src/detect-dns-query.c b/src/detect-dns-query.c index 815d005922..7269df5fcc 100644 --- a/src/detect-dns-query.c +++ b/src/detect-dns-query.c @@ -75,7 +75,6 @@ void DetectDnsQueryRegister (void) sigmatch_table[DETECT_AL_DNS_QUERY].RegisterTests = DetectDnsQueryRegisterTests; sigmatch_table[DETECT_AL_DNS_QUERY].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_DNS_QUERY].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("dns_query", SIG_FLAG_TOSERVER, 2, PrefilterTxDnsQueryRegister); diff --git a/src/detect-fast-pattern.c b/src/detect-fast-pattern.c index c2ae8166e9..ce492cb455 100644 --- a/src/detect-fast-pattern.c +++ b/src/detect-fast-pattern.c @@ -137,7 +137,6 @@ void DetectFastPatternRegister(void) sigmatch_table[DETECT_FAST_PATTERN].RegisterTests = DetectFastPatternRegisterTests; sigmatch_table[DETECT_FAST_PATTERN].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_FAST_PATTERN].flags |= SIGMATCH_PAYLOAD; DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-filesize.c b/src/detect-filesize.c index af08f48bae..151579f27b 100644 --- a/src/detect-filesize.c +++ b/src/detect-filesize.c @@ -69,7 +69,6 @@ void DetectFilesizeRegister(void) sigmatch_table[DETECT_FILESIZE].Setup = DetectFilesizeSetup; sigmatch_table[DETECT_FILESIZE].Free = DetectFilesizeFree; sigmatch_table[DETECT_FILESIZE].RegisterTests = DetectFilesizeRegisterTests; - sigmatch_table[DETECT_FILESIZE].flags |= SIGMATCH_PAYLOAD; /** XXX necessary? */ DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); diff --git a/src/detect-http-client-body.c b/src/detect-http-client-body.c index a158e137b7..d227890e21 100644 --- a/src/detect-http-client-body.c +++ b/src/detect-http-client-body.c @@ -78,7 +78,6 @@ void DetectHttpClientBodyRegister(void) sigmatch_table[DETECT_AL_HTTP_CLIENT_BODY].RegisterTests = DetectHttpClientBodyRegisterTests; sigmatch_table[DETECT_AL_HTTP_CLIENT_BODY].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_CLIENT_BODY].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_client_body", SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestBodyRegister); diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index 3b9eff786c..391dce187d 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -81,7 +81,6 @@ void DetectHttpCookieRegister(void) sigmatch_table[DETECT_AL_HTTP_COOKIE].RegisterTests = DetectHttpCookieRegisterTests; sigmatch_table[DETECT_AL_HTTP_COOKIE].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_COOKIE].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_cookie", SIG_FLAG_TOSERVER, 2, PrefilterTxRequestCookieRegister); diff --git a/src/detect-http-header-names.c b/src/detect-http-header-names.c index bdb204d2e1..1fc8f3546a 100644 --- a/src/detect-http-header-names.c +++ b/src/detect-http-header-names.c @@ -380,7 +380,6 @@ void DetectHttpHeaderNamesRegister(void) sigmatch_table[DETECT_AL_HTTP_HEADER_NAMES].Setup = DetectHttpHeaderNamesSetup; sigmatch_table[DETECT_AL_HTTP_HEADER_NAMES].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_HEADER_NAMES].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister(BUFFER_NAME, SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestHeaderNamesRegister); diff --git a/src/detect-http-header.c b/src/detect-http-header.c index 5d2e1ec59d..635d221c22 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -393,7 +393,6 @@ void DetectHttpHeaderRegister(void) sigmatch_table[DETECT_AL_HTTP_HEADER].RegisterTests = DetectHttpHeaderRegisterTests; sigmatch_table[DETECT_AL_HTTP_HEADER].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_HEADER].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_header", SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestHeadersRegister); diff --git a/src/detect-http-hh.c b/src/detect-http-hh.c index 758b978a6f..182a49e685 100644 --- a/src/detect-http-hh.c +++ b/src/detect-http-hh.c @@ -79,7 +79,6 @@ void DetectHttpHHRegister(void) sigmatch_table[DETECT_AL_HTTP_HOST].RegisterTests = DetectHttpHHRegisterTests; sigmatch_table[DETECT_AL_HTTP_HOST].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_HOST].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_host", SIG_FLAG_TOSERVER, 2, PrefilterTxHostnameRegister); diff --git a/src/detect-http-hrh.c b/src/detect-http-hrh.c index 8b3620a48b..a477a51570 100644 --- a/src/detect-http-hrh.c +++ b/src/detect-http-hrh.c @@ -78,7 +78,6 @@ void DetectHttpHRHRegister(void) sigmatch_table[DETECT_AL_HTTP_RAW_HOST].RegisterTests = DetectHttpHRHRegisterTests; sigmatch_table[DETECT_AL_HTTP_RAW_HOST].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_RAW_HOST].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_raw_host", SIG_FLAG_TOSERVER, 2, PrefilterTxHostnameRawRegister); diff --git a/src/detect-http-method.c b/src/detect-http-method.c index a4b0feb749..433c343291 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -80,7 +80,6 @@ void DetectHttpMethodRegister(void) sigmatch_table[DETECT_AL_HTTP_METHOD].Free = DetectHttpMethodFree; sigmatch_table[DETECT_AL_HTTP_METHOD].RegisterTests = DetectHttpMethodRegisterTests; sigmatch_table[DETECT_AL_HTTP_METHOD].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_METHOD].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_method", SIG_FLAG_TOSERVER, 4, PrefilterTxMethodRegister); diff --git a/src/detect-http-protocol.c b/src/detect-http-protocol.c index fbdf22e9c1..e87b034b50 100644 --- a/src/detect-http-protocol.c +++ b/src/detect-http-protocol.c @@ -216,7 +216,6 @@ void DetectHttpProtocolRegister(void) sigmatch_table[DETECT_AL_HTTP_PROTOCOL].Setup = DetectHttpProtocolSetup; sigmatch_table[DETECT_AL_HTTP_PROTOCOL].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_PROTOCOL].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister(BUFFER_NAME, SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestProtocolRegister); diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index 8b2b394cab..18872b7b44 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -79,7 +79,6 @@ void DetectHttpRawHeaderRegister(void) sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].RegisterTests = DetectHttpRawHeaderRegisterTests; sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_RAW_HEADER].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_raw_header", SIG_FLAG_TOSERVER, 2, PrefilterTxRequestHeadersRawRegister); diff --git a/src/detect-http-raw-uri.c b/src/detect-http-raw-uri.c index 367be1d595..51df60d1b9 100644 --- a/src/detect-http-raw-uri.c +++ b/src/detect-http-raw-uri.c @@ -73,7 +73,6 @@ void DetectHttpRawUriRegister(void) sigmatch_table[DETECT_AL_HTTP_RAW_URI].Free = NULL; sigmatch_table[DETECT_AL_HTTP_RAW_URI].RegisterTests = DetectHttpRawUriRegisterTests; sigmatch_table[DETECT_AL_HTTP_RAW_URI].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_RAW_URI].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_raw_uri", SIG_FLAG_TOSERVER, 2, PrefilterTxRawUriRegister); diff --git a/src/detect-http-request-line.c b/src/detect-http-request-line.c index 4fb495f3ef..3d4d69b058 100644 --- a/src/detect-http-request-line.c +++ b/src/detect-http-request-line.c @@ -83,7 +83,6 @@ void DetectHttpRequestLineRegister(void) sigmatch_table[DETECT_AL_HTTP_REQUEST_LINE].RegisterTests = DetectHttpRequestLineRegisterTests; sigmatch_table[DETECT_AL_HTTP_REQUEST_LINE].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_REQUEST_LINE].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_request_line", SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestLineRegister); diff --git a/src/detect-http-response-line.c b/src/detect-http-response-line.c index e9b573b07c..cb28358c92 100644 --- a/src/detect-http-response-line.c +++ b/src/detect-http-response-line.c @@ -83,7 +83,6 @@ void DetectHttpResponseLineRegister(void) sigmatch_table[DETECT_AL_HTTP_RESPONSE_LINE].RegisterTests = DetectHttpResponseLineRegisterTests; sigmatch_table[DETECT_AL_HTTP_RESPONSE_LINE].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_RESPONSE_LINE].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_response_line", SIG_FLAG_TOCLIENT, 2, PrefilterTxHttpResponseLineRegister); diff --git a/src/detect-http-server-body.c b/src/detect-http-server-body.c index eb6f02d31e..145995e839 100644 --- a/src/detect-http-server-body.c +++ b/src/detect-http-server-body.c @@ -79,7 +79,6 @@ void DetectHttpServerBodyRegister(void) sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].RegisterTests = DetectHttpServerBodyRegisterTests; sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].flags |= SIGMATCH_PAYLOAD; g_file_data_buffer_id = DetectBufferTypeRegister("file_data"); } diff --git a/src/detect-http-start.c b/src/detect-http-start.c index b4149301c6..1e5836b77b 100644 --- a/src/detect-http-start.c +++ b/src/detect-http-start.c @@ -305,7 +305,6 @@ void DetectHttpStartRegister(void) sigmatch_table[DETECT_AL_HTTP_START].Setup = DetectHttpStartSetup; sigmatch_table[DETECT_AL_HTTP_START].flags |= SIGMATCH_NOOPT ; - sigmatch_table[DETECT_AL_HTTP_START].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister(BUFFER_NAME, SIG_FLAG_TOSERVER, 2, PrefilterTxHttpRequestStartRegister); diff --git a/src/detect-http-stat-code.c b/src/detect-http-stat-code.c index 308ef9a46f..80743c92ba 100644 --- a/src/detect-http-stat-code.c +++ b/src/detect-http-stat-code.c @@ -82,7 +82,6 @@ void DetectHttpStatCodeRegister (void) sigmatch_table[DETECT_AL_HTTP_STAT_CODE].RegisterTests = DetectHttpStatCodeRegisterTests; sigmatch_table[DETECT_AL_HTTP_STAT_CODE].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_STAT_CODE].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_stat_code", SIG_FLAG_TOCLIENT, 4, PrefilterTxHttpStatCodeRegister); diff --git a/src/detect-http-stat-msg.c b/src/detect-http-stat-msg.c index 631fb46ab1..5ae19559ec 100644 --- a/src/detect-http-stat-msg.c +++ b/src/detect-http-stat-msg.c @@ -82,7 +82,6 @@ void DetectHttpStatMsgRegister (void) sigmatch_table[DETECT_AL_HTTP_STAT_MSG].RegisterTests = DetectHttpStatMsgRegisterTests; sigmatch_table[DETECT_AL_HTTP_STAT_MSG].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_STAT_MSG].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_stat_msg", SIG_FLAG_TOCLIENT, 3, PrefilterTxHttpStatMsgRegister); diff --git a/src/detect-http-ua.c b/src/detect-http-ua.c index 9a6df63ae1..654e72f05b 100644 --- a/src/detect-http-ua.c +++ b/src/detect-http-ua.c @@ -79,7 +79,6 @@ void DetectHttpUARegister(void) sigmatch_table[DETECT_AL_HTTP_USER_AGENT].RegisterTests = DetectHttpUARegisterTests; sigmatch_table[DETECT_AL_HTTP_USER_AGENT].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_USER_AGENT].flags |= SIGMATCH_PAYLOAD ; DetectAppLayerMpmRegister("http_user_agent", SIG_FLAG_TOSERVER, 2, PrefilterTxUARegister); diff --git a/src/detect-http-uri.c b/src/detect-http-uri.c index 67714f8848..64e2c03dd8 100644 --- a/src/detect-http-uri.c +++ b/src/detect-http-uri.c @@ -75,7 +75,6 @@ void DetectHttpUriRegister (void) sigmatch_table[DETECT_AL_HTTP_URI].RegisterTests = DetectHttpUriRegisterTests; sigmatch_table[DETECT_AL_HTTP_URI].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_HTTP_URI].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("http_uri", SIG_FLAG_TOSERVER, 2, PrefilterTxUriRegister); diff --git a/src/detect-isdataat.c b/src/detect-isdataat.c index 6eb098141d..4d5df7f738 100644 --- a/src/detect-isdataat.c +++ b/src/detect-isdataat.c @@ -73,8 +73,6 @@ void DetectIsdataatRegister(void) sigmatch_table[DETECT_ISDATAAT].Free = DetectIsdataatFree; sigmatch_table[DETECT_ISDATAAT].RegisterTests = DetectIsdataatRegisterTests; - sigmatch_table[DETECT_ISDATAAT].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-nocase.c b/src/detect-nocase.c index 18a392ed59..ee0d5bdea0 100644 --- a/src/detect-nocase.c +++ b/src/detect-nocase.c @@ -55,7 +55,6 @@ void DetectNocaseRegister(void) sigmatch_table[DETECT_NOCASE].RegisterTests = NULL; sigmatch_table[DETECT_NOCASE].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_NOCASE].flags |= SIGMATCH_PAYLOAD; } /** diff --git a/src/detect-offset.c b/src/detect-offset.c index b43cca7723..f0c84ee838 100644 --- a/src/detect-offset.c +++ b/src/detect-offset.c @@ -50,8 +50,6 @@ void DetectOffsetRegister (void) sigmatch_table[DETECT_OFFSET].Setup = DetectOffsetSetup; sigmatch_table[DETECT_OFFSET].Free = NULL; sigmatch_table[DETECT_OFFSET].RegisterTests = NULL; - - sigmatch_table[DETECT_OFFSET].flags |= SIGMATCH_PAYLOAD; } int DetectOffsetSetup (DetectEngineCtx *de_ctx, Signature *s, char *offsetstr) diff --git a/src/detect-pcre.c b/src/detect-pcre.c index d4e3bbe8a0..cea56672ba 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -94,8 +94,6 @@ void DetectPcreRegister (void) sigmatch_table[DETECT_PCRE].Free = DetectPcreFree; sigmatch_table[DETECT_PCRE].RegisterTests = DetectPcreRegisterTests; - sigmatch_table[DETECT_PCRE].flags |= SIGMATCH_PAYLOAD; - intmax_t val = 0; if (!ConfGetInt("pcre.match-limit", &val)) { diff --git a/src/detect-pktvar.c b/src/detect-pktvar.c index 930ceeeeaf..919ea2d878 100644 --- a/src/detect-pktvar.c +++ b/src/detect-pktvar.c @@ -51,8 +51,6 @@ void DetectPktvarRegister (void) sigmatch_table[DETECT_PKTVAR].Free = NULL; sigmatch_table[DETECT_PKTVAR].RegisterTests = NULL; - sigmatch_table[DETECT_PKTVAR].flags |= SIGMATCH_PAYLOAD; - DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } diff --git a/src/detect-rawbytes.c b/src/detect-rawbytes.c index 5e7e48d974..52c53b7f6a 100644 --- a/src/detect-rawbytes.c +++ b/src/detect-rawbytes.c @@ -48,7 +48,6 @@ void DetectRawbytesRegister (void) sigmatch_table[DETECT_RAWBYTES].RegisterTests = NULL; sigmatch_table[DETECT_RAWBYTES].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_RAWBYTES].flags |= SIGMATCH_PAYLOAD; } static int DetectRawbytesSetup (DetectEngineCtx *de_ctx, Signature *s, char *nullstr) diff --git a/src/detect-replace.c b/src/detect-replace.c index 08ab84c887..17f0561505 100644 --- a/src/detect-replace.c +++ b/src/detect-replace.c @@ -69,8 +69,6 @@ void DetectReplaceRegister (void) sigmatch_table[DETECT_REPLACE].Setup = DetectReplaceSetup; sigmatch_table[DETECT_REPLACE].Free = NULL; sigmatch_table[DETECT_REPLACE].RegisterTests = DetectReplaceRegisterTests; - - sigmatch_table[DETECT_REPLACE].flags |= SIGMATCH_PAYLOAD; } int DetectReplaceSetup(DetectEngineCtx *de_ctx, Signature *s, char *replacestr) diff --git a/src/detect-template-buffer.c b/src/detect-template-buffer.c index d3838a0490..aba807cbe2 100644 --- a/src/detect-template-buffer.c +++ b/src/detect-template-buffer.c @@ -56,7 +56,6 @@ void DetectTemplateBufferRegister(void) DetectTemplateBufferRegisterTests; sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].flags |= SIGMATCH_PAYLOAD; /* register inspect engines */ DetectAppLayerInspectEngineRegister("template_buffer", diff --git a/src/detect-tls-cert-issuer.c b/src/detect-tls-cert-issuer.c index f918b301db..dc4c8b621e 100644 --- a/src/detect-tls-cert-issuer.c +++ b/src/detect-tls-cert-issuer.c @@ -71,7 +71,6 @@ void DetectTlsIssuerRegister(void) sigmatch_table[DETECT_AL_TLS_CERT_ISSUER].RegisterTests = DetectTlsIssuerRegisterTests; sigmatch_table[DETECT_AL_TLS_CERT_ISSUER].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_TLS_CERT_ISSUER].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("tls_cert_issuer", SIG_FLAG_TOCLIENT, 2, PrefilterTxTlsIssuerRegister); diff --git a/src/detect-tls-cert-subject.c b/src/detect-tls-cert-subject.c index affea07ea7..d6581fca4c 100644 --- a/src/detect-tls-cert-subject.c +++ b/src/detect-tls-cert-subject.c @@ -71,7 +71,6 @@ void DetectTlsSubjectRegister(void) sigmatch_table[DETECT_AL_TLS_CERT_SUBJECT].RegisterTests = DetectTlsSubjectRegisterTests; sigmatch_table[DETECT_AL_TLS_CERT_SUBJECT].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_TLS_CERT_SUBJECT].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("tls_cert_subject", SIG_FLAG_TOCLIENT, 2, PrefilterTxTlsSubjectRegister); diff --git a/src/detect-tls-sni.c b/src/detect-tls-sni.c index a87f0a6e7e..195175a70f 100644 --- a/src/detect-tls-sni.c +++ b/src/detect-tls-sni.c @@ -71,7 +71,6 @@ void DetectTlsSniRegister(void) sigmatch_table[DETECT_AL_TLS_SNI].RegisterTests = DetectTlsSniRegisterTests; sigmatch_table[DETECT_AL_TLS_SNI].flags |= SIGMATCH_NOOPT; - sigmatch_table[DETECT_AL_TLS_SNI].flags |= SIGMATCH_PAYLOAD; DetectAppLayerMpmRegister("tls_sni", SIG_FLAG_TOSERVER, 2, PrefilterTxTlsSniRegister); diff --git a/src/detect-uricontent.c b/src/detect-uricontent.c index dc77cc9e69..b541e08735 100644 --- a/src/detect-uricontent.c +++ b/src/detect-uricontent.c @@ -74,8 +74,6 @@ void DetectUricontentRegister (void) sigmatch_table[DETECT_URICONTENT].Free = DetectUricontentFree; sigmatch_table[DETECT_URICONTENT].RegisterTests = DetectUricontentRegisterTests; - sigmatch_table[DETECT_URICONTENT].flags |= SIGMATCH_PAYLOAD; - g_http_uri_buffer_id = DetectBufferTypeRegister("http_uri"); } diff --git a/src/detect-urilen.c b/src/detect-urilen.c index 4e65d0b831..c569930725 100644 --- a/src/detect-urilen.c +++ b/src/detect-urilen.c @@ -70,7 +70,6 @@ void DetectUrilenRegister(void) sigmatch_table[DETECT_AL_URILEN].Setup = DetectUrilenSetup; sigmatch_table[DETECT_AL_URILEN].Free = DetectUrilenFree; sigmatch_table[DETECT_AL_URILEN].RegisterTests = DetectUrilenRegisterTests; - sigmatch_table[DETECT_AL_URILEN].flags |= SIGMATCH_PAYLOAD; DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); diff --git a/src/detect-within.c b/src/detect-within.c index 61272e3844..b7921a3138 100644 --- a/src/detect-within.c +++ b/src/detect-within.c @@ -55,8 +55,6 @@ void DetectWithinRegister(void) sigmatch_table[DETECT_WITHIN].Setup = DetectWithinSetup; sigmatch_table[DETECT_WITHIN].Free = NULL; sigmatch_table[DETECT_WITHIN].RegisterTests = DetectWithinRegisterTests; - - sigmatch_table[DETECT_WITHIN].flags |= SIGMATCH_PAYLOAD; } /** \brief Setup within pattern (content/uricontent) modifier. diff --git a/src/detect.c b/src/detect.c index 4906c52f49..494b07b5aa 100644 --- a/src/detect.c +++ b/src/detect.c @@ -2043,19 +2043,6 @@ static int SignatureIsInspectingPayload(DetectEngineCtx *de_ctx, const Signature if (s->init_data->smlists[DETECT_SM_LIST_PMATCH] != NULL) { return 1; } -#if 0 - SigMatch *sm = s->sm_lists[DETECT_SM_LIST_PMATCH]; - if (sm == NULL) - return 0; - - for (; sm != NULL; sm = sm->next) { - if (sigmatch_table[sm->type].flags & SIGMATCH_PAYLOAD) { - if (!(de_ctx->flags & DE_QUIET)) - SCLogDebug("Signature (%" PRIu32 "): is inspecting payload.", s->id); - return 1; - } - } -#endif return 0; } @@ -3900,12 +3887,6 @@ static void PrintFeatureList(const SigTableElmt *e, char sep) printf("compatible with decoder event only rule"); prev = 1; } - if (flags & SIGMATCH_PAYLOAD) { - if (prev == 1) - printf("%c", sep); - printf("payload inspecting keyword"); - prev = 1; - } if (e->SupportsPrefilter) { if (prev == 1) printf("%c", sep); diff --git a/src/detect.h b/src/detect.h index 194ca4a923..5419228dc0 100644 --- a/src/detect.h +++ b/src/detect.h @@ -1089,13 +1089,11 @@ typedef struct SigGroupHead_ { #define SIGMATCH_IPONLY_COMPAT (1 << 1) /** sigmatch is compatible with a decode event only rule */ #define SIGMATCH_DEONLY_COMPAT (1 << 2) -/**< Flag to indicate that the signature inspects the packet payload */ -#define SIGMATCH_PAYLOAD (1 << 3) /**< Flag to indicate that the signature is not built-in */ -#define SIGMATCH_NOT_BUILT (1 << 4) +#define SIGMATCH_NOT_BUILT (1 << 3) /** sigmatch may have options, so the parser should be ready to * deal with both cases */ -#define SIGMATCH_OPTIONAL_OPT (1 << 5) +#define SIGMATCH_OPTIONAL_OPT (1 << 4) enum DetectEngineTenantSelectors {