From 2c0e434bb8b3fc9c77ad127c909f2c521d99fa8e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 24 Mar 2023 16:54:27 +0100 Subject: [PATCH] detect: pass de_ctx to DetectBufferSetActiveList --- src/detect-dce-stub-data.c | 2 +- src/detect-dnp3.c | 2 +- src/detect-dns-query.c | 2 +- src/detect-engine.c | 2 +- src/detect-engine.h | 6 +++++- src/detect-file-data.c | 2 +- src/detect-filemagic.c | 2 +- src/detect-filename.c | 2 +- src/detect-frame.c | 2 +- src/detect-http-client-body.c | 2 +- src/detect-http-cookie.c | 2 +- src/detect-http-header-names.c | 2 +- src/detect-http-header.c | 2 +- src/detect-http-headers-stub.h | 2 +- src/detect-http-host.c | 4 ++-- src/detect-http-method.c | 2 +- src/detect-http-protocol.c | 2 +- src/detect-http-raw-header.c | 2 +- src/detect-http-request-line.c | 2 +- src/detect-http-response-line.c | 2 +- src/detect-http-server-body.c | 2 +- src/detect-http-start.c | 2 +- src/detect-http-stat-code.c | 2 +- src/detect-http-stat-msg.c | 2 +- src/detect-http-ua.c | 2 +- src/detect-http-uri.c | 4 ++-- src/detect-http2.c | 4 ++-- src/detect-icmpv4hdr.c | 2 +- src/detect-icmpv6hdr.c | 2 +- src/detect-ike-key-exchange-payload.c | 2 +- src/detect-ike-nonce-payload.c | 2 +- src/detect-ike-spi.c | 4 ++-- src/detect-ike-vendor.c | 2 +- src/detect-ipv4hdr.c | 2 +- src/detect-ipv6hdr.c | 2 +- src/detect-krb5-cname.c | 2 +- src/detect-krb5-sname.c | 2 +- src/detect-mqtt-connect-clientid.c | 2 +- src/detect-mqtt-connect-password.c | 2 +- src/detect-mqtt-connect-username.c | 2 +- src/detect-mqtt-connect-willmessage.c | 2 +- src/detect-mqtt-connect-willtopic.c | 2 +- src/detect-mqtt-publish-message.c | 2 +- src/detect-mqtt-publish-topic.c | 2 +- src/detect-mqtt-subscribe-topic.c | 2 +- src/detect-mqtt-unsubscribe-topic.c | 2 +- src/detect-quic-cyu-hash.c | 2 +- src/detect-quic-cyu-string.c | 2 +- src/detect-quic-sni.c | 2 +- src/detect-quic-ua.c | 2 +- src/detect-quic-version.c | 2 +- src/detect-rfb-name.c | 2 +- src/detect-sip-method.c | 2 +- src/detect-sip-protocol.c | 2 +- src/detect-sip-request-line.c | 2 +- src/detect-sip-response-line.c | 2 +- src/detect-sip-stat-code.c | 2 +- src/detect-sip-stat-msg.c | 2 +- src/detect-sip-uri.c | 2 +- src/detect-smb-ntlmssp.c | 4 ++-- src/detect-smb-share.c | 4 ++-- src/detect-snmp-community.c | 2 +- src/detect-snmp-usm.c | 2 +- src/detect-ssh-hassh-server-string.c | 2 +- src/detect-ssh-hassh-server.c | 2 +- src/detect-ssh-hassh-string.c | 2 +- src/detect-ssh-hassh.c | 2 +- src/detect-ssh-proto.c | 2 +- src/detect-ssh-software.c | 2 +- src/detect-tcphdr.c | 2 +- src/detect-tls-cert-fingerprint.c | 2 +- src/detect-tls-cert-issuer.c | 2 +- src/detect-tls-cert-serial.c | 2 +- src/detect-tls-cert-subject.c | 2 +- src/detect-tls-certs.c | 2 +- src/detect-tls-ja3-hash.c | 2 +- src/detect-tls-ja3-string.c | 2 +- src/detect-tls-ja3s-hash.c | 2 +- src/detect-tls-ja3s-string.c | 2 +- src/detect-tls-random.c | 6 +++--- src/detect-tls-sni.c | 2 +- src/detect-udphdr.c | 2 +- 82 files changed, 94 insertions(+), 90 deletions(-) diff --git a/src/detect-dce-stub-data.c b/src/detect-dce-stub-data.c index 44133a7bf0..50d0387b07 100644 --- a/src/detect-dce-stub-data.c +++ b/src/detect-dce-stub-data.c @@ -173,7 +173,7 @@ static int DetectDceStubDataSetup(DetectEngineCtx *de_ctx, Signature *s, const c { if (DetectSignatureSetAppProto(s, ALPROTO_DCERPC) < 0) return -1; - if (DetectBufferSetActiveList(s, g_dce_stub_data_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_dce_stub_data_buffer_id) < 0) return -1; return 0; } diff --git a/src/detect-dnp3.c b/src/detect-dnp3.c index b236950ab8..e8f2c052ae 100644 --- a/src/detect-dnp3.c +++ b/src/detect-dnp3.c @@ -534,7 +534,7 @@ static int DetectDNP3DataSetup(DetectEngineCtx *de_ctx, Signature *s, const char if (DetectSignatureSetAppProto(s, ALPROTO_DNP3) != 0) return -1; - if (DetectBufferSetActiveList(s, g_dnp3_data_buffer_id) != 0) + if (DetectBufferSetActiveList(de_ctx, s, g_dnp3_data_buffer_id) != 0) return -1; SCReturnInt(0); diff --git a/src/detect-dns-query.c b/src/detect-dns-query.c index 045b51e98a..67ec7aba9b 100644 --- a/src/detect-dns-query.c +++ b/src/detect-dns-query.c @@ -253,7 +253,7 @@ void DetectDnsQueryRegister (void) static int DetectDnsQuerySetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_dns_query_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_dns_query_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_DNS) < 0) return -1; diff --git a/src/detect-engine.c b/src/detect-engine.c index 5913400eaf..769b9852b5 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1317,7 +1317,7 @@ bool DetectBufferIsPresent(const Signature *s, const uint32_t buf_id) return false; } -int DetectBufferSetActiveList(Signature *s, const int list) +int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list) { BUG_ON(s->init_data == NULL); diff --git a/src/detect-engine.h b/src/detect-engine.h index 7a790db749..848aa4abb5 100644 --- a/src/detect-engine.h +++ b/src/detect-engine.h @@ -184,7 +184,11 @@ void DetectEngineSetParseMetadata(void); void DetectEngineUnsetParseMetadata(void); int DetectEngineMustParseMetadata(void); -int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list); +SigMatch *DetectBufferGetFirstSigMatch(const Signature *s, const uint32_t buf_id); +SigMatch *DetectBufferGetLastSigMatch(const Signature *s, const uint32_t buf_id); +bool DetectBufferIsPresent(const Signature *s, const uint32_t buf_id); + +int WARN_UNUSED DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list); int DetectBufferGetActiveList(DetectEngineCtx *de_ctx, Signature *s); SigMatch *DetectBufferGetFirstSigMatch(const Signature *s, const uint32_t buf_id); SigMatch *DetectBufferGetLastSigMatch(const Signature *s, const uint32_t buf_id); diff --git a/src/detect-file-data.c b/src/detect-file-data.c index 2d3cc1561d..c81e5bb650 100644 --- a/src/detect-file-data.c +++ b/src/detect-file-data.c @@ -216,7 +216,7 @@ static int DetectFiledataSetup (DetectEngineCtx *de_ctx, Signature *s, const cha return -1; } - if (DetectBufferSetActiveList(s, DetectBufferTypeGetByName("file_data")) < 0) + if (DetectBufferSetActiveList(de_ctx, s, DetectBufferTypeGetByName("file_data")) < 0) return -1; s->init_data->init_flags |= SIG_FLAG_INIT_FILEDATA; diff --git a/src/detect-filemagic.c b/src/detect-filemagic.c index 29ecde687c..e68d659d64 100644 --- a/src/detect-filemagic.c +++ b/src/detect-filemagic.c @@ -428,7 +428,7 @@ static void DetectFilemagicFree(DetectEngineCtx *de_ctx, void *ptr) */ static int DetectFilemagicSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_file_magic_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_file_magic_buffer_id) < 0) return -1; if (g_magic_thread_ctx_id == -1) { diff --git a/src/detect-filename.c b/src/detect-filename.c index 5ca1cc88ca..e38754f7d3 100644 --- a/src/detect-filename.c +++ b/src/detect-filename.c @@ -344,7 +344,7 @@ static void DetectFilenameFree(DetectEngineCtx *de_ctx, void *ptr) */ static int DetectFilenameSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_file_name_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_file_name_buffer_id) < 0) return -1; s->file_flags |= (FILE_SIG_NEED_FILE | FILE_SIG_NEED_FILENAME); return 0; diff --git a/src/detect-frame.c b/src/detect-frame.c index c74c145a07..d2f7461f75 100644 --- a/src/detect-frame.c +++ b/src/detect-frame.c @@ -138,7 +138,7 @@ static int DetectFrameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *s if (buffer_id < 0) return -1; - if (DetectBufferSetActiveList(s, buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, buffer_id) < 0) return -1; FrameConfigEnable(keyword_alproto, frame_type); diff --git a/src/detect-http-client-body.c b/src/detect-http-client-body.c index 9bb08d5cdf..7b90191b32 100644 --- a/src/detect-http-client-body.c +++ b/src/detect-http-client-body.c @@ -156,7 +156,7 @@ int DetectHttpClientBodySetup(DetectEngineCtx *de_ctx, Signature *s, const char */ static int DetectHttpClientBodySetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_client_body_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_client_body_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) return -1; diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index ee3b85daa5..e2754138fd 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -160,7 +160,7 @@ static int DetectHttpCookieSetup(DetectEngineCtx *de_ctx, Signature *s, const ch */ static int DetectHttpCookieSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_cookie_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_cookie_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) diff --git a/src/detect-http-header-names.c b/src/detect-http-header-names.c index eb9e4f117c..58989a1825 100644 --- a/src/detect-http-header-names.c +++ b/src/detect-http-header-names.c @@ -196,7 +196,7 @@ static InspectionBuffer *GetBuffer2ForTX(DetectEngineThreadCtx *det_ctx, */ static int DetectHttpHeaderNamesSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) diff --git a/src/detect-http-header.c b/src/detect-http-header.c index f9a24d63d3..6747aee50c 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -404,7 +404,7 @@ static int DetectHttpHeaderSetup(DetectEngineCtx *de_ctx, Signature *s, const ch */ static int DetectHttpHeaderSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_header_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_header_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http-headers-stub.h b/src/detect-http-headers-stub.h index ef3712b671..3a036d6220 100644 --- a/src/detect-http-headers-stub.h +++ b/src/detect-http-headers-stub.h @@ -165,7 +165,7 @@ static InspectionBuffer *GetResponseData2(DetectEngineThreadCtx *det_ctx, */ static int DetectHttpHeadersSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) diff --git a/src/detect-http-host.c b/src/detect-http-host.c index 982d2327f2..8db78f6dc4 100644 --- a/src/detect-http-host.c +++ b/src/detect-http-host.c @@ -223,7 +223,7 @@ static bool DetectHttpHostValidateCallback(const Signature *s, const char **sige */ static int DetectHttpHostSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_host_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_host_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; @@ -323,7 +323,7 @@ int DetectHttpHRHSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) */ static int DetectHttpHostRawSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_raw_host_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_raw_host_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http-method.c b/src/detect-http-method.c index 7eb9ac7f5e..7b8dbc3c26 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -148,7 +148,7 @@ static int DetectHttpMethodSetup(DetectEngineCtx *de_ctx, Signature *s, const ch */ static int DetectHttpMethodSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_method_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_method_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) diff --git a/src/detect-http-protocol.c b/src/detect-http-protocol.c index 162066ebee..809dc20d71 100644 --- a/src/detect-http-protocol.c +++ b/src/detect-http-protocol.c @@ -72,7 +72,7 @@ static int g_buffer_id = 0; static int DetectHttpProtocolSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index 78e31b1342..341c7f28a4 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -158,7 +158,7 @@ int DetectHttpRawHeaderSetup(DetectEngineCtx *de_ctx, Signature *s, const char * */ static int DetectHttpRawHeaderSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_raw_header_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_raw_header_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http-request-line.c b/src/detect-http-request-line.c index 106374dac8..2dc64c644c 100644 --- a/src/detect-http-request-line.c +++ b/src/detect-http-request-line.c @@ -113,7 +113,7 @@ void DetectHttpRequestLineRegister(void) */ static int DetectHttpRequestLineSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_http_request_line_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_request_line_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) diff --git a/src/detect-http-response-line.c b/src/detect-http-response-line.c index 4c297ad977..2965c5b48b 100644 --- a/src/detect-http-response-line.c +++ b/src/detect-http-response-line.c @@ -112,7 +112,7 @@ void DetectHttpResponseLineRegister(void) */ static int DetectHttpResponseLineSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_http_response_line_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_response_line_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) diff --git a/src/detect-http-server-body.c b/src/detect-http-server-body.c index 1b6aff7c4d..4c5896bb82 100644 --- a/src/detect-http-server-body.c +++ b/src/detect-http-server-body.c @@ -124,7 +124,7 @@ int DetectHttpServerBodySetup(DetectEngineCtx *de_ctx, Signature *s, const char */ static int DetectHttpServerBodySetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_file_data_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_file_data_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) return -1; diff --git a/src/detect-http-start.c b/src/detect-http-start.c index c13d1fcb09..fed1abc962 100644 --- a/src/detect-http-start.c +++ b/src/detect-http-start.c @@ -167,7 +167,7 @@ static InspectionBuffer *GetBuffer1ForTX(DetectEngineThreadCtx *det_ctx, static int DetectHttpStartSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) diff --git a/src/detect-http-stat-code.c b/src/detect-http-stat-code.c index ec62f9c568..1e7087a318 100644 --- a/src/detect-http-stat-code.c +++ b/src/detect-http-stat-code.c @@ -144,7 +144,7 @@ static int DetectHttpStatCodeSetup(DetectEngineCtx *de_ctx, Signature *s, const */ static int DetectHttpStatCodeSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_stat_code_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_stat_code_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http-stat-msg.c b/src/detect-http-stat-msg.c index c2be938cc9..2c3b672017 100644 --- a/src/detect-http-stat-msg.c +++ b/src/detect-http-stat-msg.c @@ -135,7 +135,7 @@ static int DetectHttpStatMsgSetup(DetectEngineCtx *de_ctx, Signature *s, const c */ static int DetectHttpStatMsgSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_stat_msg_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_stat_msg_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0) return -1; diff --git a/src/detect-http-ua.c b/src/detect-http-ua.c index b954018f19..7138cf93fe 100644 --- a/src/detect-http-ua.c +++ b/src/detect-http-ua.c @@ -146,7 +146,7 @@ int DetectHttpUASetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) */ static int DetectHttpUserAgentSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_ua_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_ua_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http-uri.c b/src/detect-http-uri.c index 09aa55e7f4..cc43023a78 100644 --- a/src/detect-http-uri.c +++ b/src/detect-http-uri.c @@ -210,7 +210,7 @@ static void DetectHttpUriSetupCallback(const DetectEngineCtx *de_ctx, */ static int DetectHttpUriSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_uri_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_uri_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; @@ -305,7 +305,7 @@ static void DetectHttpRawUriSetupCallback(const DetectEngineCtx *de_ctx, */ static int DetectHttpRawUriSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_http_raw_uri_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http_raw_uri_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0) return -1; diff --git a/src/detect-http2.c b/src/detect-http2.c index 83b9aeb864..69e79dfc93 100644 --- a/src/detect-http2.c +++ b/src/detect-http2.c @@ -658,7 +658,7 @@ void DetectHTTP2settingsFree(DetectEngineCtx *de_ctx, void *ptr) static int DetectHTTP2headerNameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_http2_header_name_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http2_header_name_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP2) != 0) @@ -788,7 +788,7 @@ static uint8_t DetectEngineInspectHttp2HeaderName(DetectEngineCtx *de_ctx, static int DetectHTTP2headerSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_http2_header_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_http2_header_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_HTTP2) != 0) diff --git a/src/detect-icmpv4hdr.c b/src/detect-icmpv4hdr.c index 42a6b49222..b0c6f54b75 100644 --- a/src/detect-icmpv4hdr.c +++ b/src/detect-icmpv4hdr.c @@ -84,7 +84,7 @@ static int DetectIcmpv4HdrSetup(DetectEngineCtx *de_ctx, Signature *s, const cha s->proto.flags |= DETECT_PROTO_IPV4; s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_icmpv4hdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_icmpv4hdr_buffer_id) < 0) return -1; return 0; diff --git a/src/detect-icmpv6hdr.c b/src/detect-icmpv6hdr.c index 7de83dc5f1..0d990e1108 100644 --- a/src/detect-icmpv6hdr.c +++ b/src/detect-icmpv6hdr.c @@ -91,7 +91,7 @@ static int DetectICMPv6hdrSetup (DetectEngineCtx *de_ctx, Signature *s, const ch s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_icmpv6hdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_icmpv6hdr_buffer_id) < 0) return -1; return 0; diff --git a/src/detect-ike-key-exchange-payload.c b/src/detect-ike-key-exchange-payload.c index 4db49f7156..813e5bf080 100644 --- a/src/detect-ike-key-exchange-payload.c +++ b/src/detect-ike-key-exchange-payload.c @@ -59,7 +59,7 @@ static int g_buffer_key_exchange_id = 0; static int DetectKeyExchangeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_key_exchange_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_key_exchange_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_IKE) < 0) diff --git a/src/detect-ike-nonce-payload.c b/src/detect-ike-nonce-payload.c index 307ce23f43..a6b73cdf84 100644 --- a/src/detect-ike-nonce-payload.c +++ b/src/detect-ike-nonce-payload.c @@ -59,7 +59,7 @@ static int g_buffer_nonce_id = 0; static int DetectNonceSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_nonce_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_nonce_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_IKE) < 0) diff --git a/src/detect-ike-spi.c b/src/detect-ike-spi.c index d181dadb0a..5514d0202c 100644 --- a/src/detect-ike-spi.c +++ b/src/detect-ike-spi.c @@ -65,7 +65,7 @@ static int g_buffer_responder_id = 0; static int DetectSpiInitiatorSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_initiator_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_initiator_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_IKE) < 0) @@ -76,7 +76,7 @@ static int DetectSpiInitiatorSetup(DetectEngineCtx *de_ctx, Signature *s, const static int DetectSpiResponderSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_responder_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_responder_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_IKE) < 0) diff --git a/src/detect-ike-vendor.c b/src/detect-ike-vendor.c index 4dcc9c71b8..edefc43822 100644 --- a/src/detect-ike-vendor.c +++ b/src/detect-ike-vendor.c @@ -204,7 +204,7 @@ void DetectIkeVendorRegister(void) static int DetectIkeVendorSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_ike_vendor_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ike_vendor_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_IKE) < 0) return -1; diff --git a/src/detect-ipv4hdr.c b/src/detect-ipv4hdr.c index e39dddea05..76334410e3 100644 --- a/src/detect-ipv4hdr.c +++ b/src/detect-ipv4hdr.c @@ -87,7 +87,7 @@ static int DetectIpv4hdrSetup (DetectEngineCtx *de_ctx, Signature *s, const char s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_ipv4hdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ipv4hdr_buffer_id) < 0) return -1; return 0; diff --git a/src/detect-ipv6hdr.c b/src/detect-ipv6hdr.c index e7221a9f9e..eacff043a9 100644 --- a/src/detect-ipv6hdr.c +++ b/src/detect-ipv6hdr.c @@ -87,7 +87,7 @@ static int DetectIpv6hdrSetup (DetectEngineCtx *de_ctx, Signature *s, const char s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_ipv6hdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ipv6hdr_buffer_id) < 0) return -1; return 0; diff --git a/src/detect-krb5-cname.c b/src/detect-krb5-cname.c index 6054ccc5c6..257f3ed071 100644 --- a/src/detect-krb5-cname.c +++ b/src/detect-krb5-cname.c @@ -46,7 +46,7 @@ struct Krb5PrincipalNameDataArgs { static int DetectKrb5CNameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_krb5_cname_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_krb5_cname_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_KRB5) != 0) diff --git a/src/detect-krb5-sname.c b/src/detect-krb5-sname.c index eb281af2a2..79c08f38a9 100644 --- a/src/detect-krb5-sname.c +++ b/src/detect-krb5-sname.c @@ -46,7 +46,7 @@ struct Krb5PrincipalNameDataArgs { static int DetectKrb5SNameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_krb5_sname_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_krb5_sname_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_KRB5) != 0) diff --git a/src/detect-mqtt-connect-clientid.c b/src/detect-mqtt-connect-clientid.c index 421b486d1e..1acebf9943 100644 --- a/src/detect-mqtt-connect-clientid.c +++ b/src/detect-mqtt-connect-clientid.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTConnectClientIDSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-connect-password.c b/src/detect-mqtt-connect-password.c index 9c964418cd..c08390748f 100644 --- a/src/detect-mqtt-connect-password.c +++ b/src/detect-mqtt-connect-password.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTConnectPasswordSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-connect-username.c b/src/detect-mqtt-connect-username.c index a4f5a723d5..dbc772d220 100644 --- a/src/detect-mqtt-connect-username.c +++ b/src/detect-mqtt-connect-username.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTConnectUsernameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-connect-willmessage.c b/src/detect-mqtt-connect-willmessage.c index 4fdcab6250..48d851d320 100644 --- a/src/detect-mqtt-connect-willmessage.c +++ b/src/detect-mqtt-connect-willmessage.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTConnectWillMessageSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-connect-willtopic.c b/src/detect-mqtt-connect-willtopic.c index 2794a7d48c..da3d2640dd 100644 --- a/src/detect-mqtt-connect-willtopic.c +++ b/src/detect-mqtt-connect-willtopic.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTConnectWillTopicSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-publish-message.c b/src/detect-mqtt-publish-message.c index 32671bc32c..32f3bd6460 100644 --- a/src/detect-mqtt-publish-message.c +++ b/src/detect-mqtt-publish-message.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTPublishMessageSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-publish-topic.c b/src/detect-mqtt-publish-topic.c index 3a33acf732..c03a47b5ed 100644 --- a/src/detect-mqtt-publish-topic.c +++ b/src/detect-mqtt-publish-topic.c @@ -39,7 +39,7 @@ static int g_buffer_id = 0; static int DetectMQTTPublishTopicSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) diff --git a/src/detect-mqtt-subscribe-topic.c b/src/detect-mqtt-subscribe-topic.c index 34b813023f..24c601c6e2 100644 --- a/src/detect-mqtt-subscribe-topic.c +++ b/src/detect-mqtt-subscribe-topic.c @@ -239,7 +239,7 @@ void DetectMQTTSubscribeTopicRegister (void) static int DetectMQTTSubscribeTopicSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_mqtt_subscribe_topic_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_mqtt_subscribe_topic_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) return -1; diff --git a/src/detect-mqtt-unsubscribe-topic.c b/src/detect-mqtt-unsubscribe-topic.c index b6b113942f..d349971bee 100644 --- a/src/detect-mqtt-unsubscribe-topic.c +++ b/src/detect-mqtt-unsubscribe-topic.c @@ -239,7 +239,7 @@ void DetectMQTTUnsubscribeTopicRegister (void) static int DetectMQTTUnsubscribeTopicSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_mqtt_unsubscribe_topic_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_mqtt_unsubscribe_topic_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_MQTT) < 0) return -1; diff --git a/src/detect-quic-cyu-hash.c b/src/detect-quic-cyu-hash.c index 193f2fc395..c79f3ab2cb 100644 --- a/src/detect-quic-cyu-hash.c +++ b/src/detect-quic-cyu-hash.c @@ -51,7 +51,7 @@ struct QuicHashGetDataArgs { static int DetectQuicCyuHashSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_QUIC) < 0) diff --git a/src/detect-quic-cyu-string.c b/src/detect-quic-cyu-string.c index 9e4f65887b..d1ec757b21 100644 --- a/src/detect-quic-cyu-string.c +++ b/src/detect-quic-cyu-string.c @@ -49,7 +49,7 @@ struct QuicStringGetDataArgs { static int DetectQuicCyuStringSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_QUIC) < 0) diff --git a/src/detect-quic-sni.c b/src/detect-quic-sni.c index 439f6b1fb6..722f50d046 100644 --- a/src/detect-quic-sni.c +++ b/src/detect-quic-sni.c @@ -102,7 +102,7 @@ void DetectQuicSniRegister(void) */ static int DetectQuicSniSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr) { - if (DetectBufferSetActiveList(s, quic_sni_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, quic_sni_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_QUIC) < 0) diff --git a/src/detect-quic-ua.c b/src/detect-quic-ua.c index b90f4fc5e5..c491d05b06 100644 --- a/src/detect-quic-ua.c +++ b/src/detect-quic-ua.c @@ -102,7 +102,7 @@ void DetectQuicUaRegister(void) */ static int DetectQuicUaSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr) { - if (DetectBufferSetActiveList(s, quic_ua_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, quic_ua_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_QUIC) < 0) diff --git a/src/detect-quic-version.c b/src/detect-quic-version.c index d97f62ac1e..fcd99545aa 100644 --- a/src/detect-quic-version.c +++ b/src/detect-quic-version.c @@ -106,7 +106,7 @@ void DetectQuicVersionRegister(void) */ static int DetectQuicVersionSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr) { - if (DetectBufferSetActiveList(s, quic_version_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, quic_version_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_QUIC) < 0) diff --git a/src/detect-rfb-name.c b/src/detect-rfb-name.c index 464c4143fe..5e8251d51a 100644 --- a/src/detect-rfb-name.c +++ b/src/detect-rfb-name.c @@ -58,7 +58,7 @@ static int g_buffer_id = 0; static int DetectRfbNameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_RFB) < 0) diff --git a/src/detect-sip-method.c b/src/detect-sip-method.c index 98bd2cd5a4..bb2933e479 100644 --- a/src/detect-sip-method.c +++ b/src/detect-sip-method.c @@ -61,7 +61,7 @@ static int g_buffer_id = 0; static int DetectSipMethodSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-protocol.c b/src/detect-sip-protocol.c index f463346de4..41fdcac538 100644 --- a/src/detect-sip-protocol.c +++ b/src/detect-sip-protocol.c @@ -62,7 +62,7 @@ static int g_buffer_id = 0; static int DetectSipProtocolSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-request-line.c b/src/detect-sip-request-line.c index ee51737c4f..9d9f4c9c5f 100644 --- a/src/detect-sip-request-line.c +++ b/src/detect-sip-request-line.c @@ -61,7 +61,7 @@ static int g_buffer_id = 0; static int DetectSipRequestLineSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-response-line.c b/src/detect-sip-response-line.c index 349dd79538..99061f951d 100644 --- a/src/detect-sip-response-line.c +++ b/src/detect-sip-response-line.c @@ -61,7 +61,7 @@ static int g_buffer_id = 0; static int DetectSipResponseLineSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-stat-code.c b/src/detect-sip-stat-code.c index 657582748b..9b663c971e 100644 --- a/src/detect-sip-stat-code.c +++ b/src/detect-sip-stat-code.c @@ -62,7 +62,7 @@ static int g_buffer_id = 0; static int DetectSipStatCodeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-stat-msg.c b/src/detect-sip-stat-msg.c index ff0e688528..a9b9247a5d 100644 --- a/src/detect-sip-stat-msg.c +++ b/src/detect-sip-stat-msg.c @@ -62,7 +62,7 @@ static int g_buffer_id = 0; static int DetectSipStatMsgSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-sip-uri.c b/src/detect-sip-uri.c index a2de8294c1..1a000fdb54 100644 --- a/src/detect-sip-uri.c +++ b/src/detect-sip-uri.c @@ -74,7 +74,7 @@ static void DetectSipUriSetupCallback(const DetectEngineCtx *de_ctx, static int DetectSipUriSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SIP) < 0) diff --git a/src/detect-smb-ntlmssp.c b/src/detect-smb-ntlmssp.c index c301b0299a..a88b89c6f4 100644 --- a/src/detect-smb-ntlmssp.c +++ b/src/detect-smb-ntlmssp.c @@ -45,7 +45,7 @@ static int g_smb_nltmssp_user_buffer_id = 0; static int DetectSmbNtlmsspUserSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_smb_nltmssp_user_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_smb_nltmssp_user_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SMB) < 0) @@ -102,7 +102,7 @@ static int g_smb_nltmssp_domain_buffer_id = 0; static int DetectSmbNtlmsspDomainSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_smb_nltmssp_domain_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_smb_nltmssp_domain_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SMB) < 0) diff --git a/src/detect-smb-share.c b/src/detect-smb-share.c index c54ffa3779..8d4d145fad 100644 --- a/src/detect-smb-share.c +++ b/src/detect-smb-share.c @@ -45,7 +45,7 @@ static int g_smb_named_pipe_buffer_id = 0; static int DetectSmbNamedPipeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_smb_named_pipe_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_smb_named_pipe_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SMB) < 0) @@ -108,7 +108,7 @@ static int g_smb_share_buffer_id = 0; static int DetectSmbShareSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_smb_share_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_smb_share_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SMB) < 0) diff --git a/src/detect-snmp-community.c b/src/detect-snmp-community.c index f1882c269e..93e7d21671 100644 --- a/src/detect-snmp-community.c +++ b/src/detect-snmp-community.c @@ -81,7 +81,7 @@ void DetectSNMPCommunityRegister(void) static int DetectSNMPCommunitySetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_snmp_rust_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_snmp_rust_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SNMP) != 0) diff --git a/src/detect-snmp-usm.c b/src/detect-snmp-usm.c index a6c7403eb4..2e03fca16b 100644 --- a/src/detect-snmp-usm.c +++ b/src/detect-snmp-usm.c @@ -27,7 +27,7 @@ static int g_buffer_id = 0; static int DetectSNMPUsmSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SNMP) != 0) diff --git a/src/detect-ssh-hassh-server-string.c b/src/detect-ssh-hassh-server-string.c index 0afe683ba4..27b0e0cb75 100644 --- a/src/detect-ssh-hassh-server-string.c +++ b/src/detect-ssh-hassh-server-string.c @@ -96,7 +96,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, */ static int DetectSshHasshServerStringSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_ssh_hassh_server_string_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ssh_hassh_server_string_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-ssh-hassh-server.c b/src/detect-ssh-hassh-server.c index 30ed206b50..4f04287428 100644 --- a/src/detect-ssh-hassh-server.c +++ b/src/detect-ssh-hassh-server.c @@ -97,7 +97,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, */ static int DetectSshHasshServerSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_ssh_hassh_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ssh_hassh_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-ssh-hassh-string.c b/src/detect-ssh-hassh-string.c index 64cf45182b..e639e64b13 100644 --- a/src/detect-ssh-hassh-string.c +++ b/src/detect-ssh-hassh-string.c @@ -96,7 +96,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, */ static int DetectSshHasshStringSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_ssh_hassh_string_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ssh_hassh_string_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-ssh-hassh.c b/src/detect-ssh-hassh.c index 5c87fe1904..a2da4e2c3b 100644 --- a/src/detect-ssh-hassh.c +++ b/src/detect-ssh-hassh.c @@ -97,7 +97,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, */ static int DetectSshHasshSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_ssh_hassh_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_ssh_hassh_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-ssh-proto.c b/src/detect-ssh-proto.c index 4f4874a916..a979190de1 100644 --- a/src/detect-ssh-proto.c +++ b/src/detect-ssh-proto.c @@ -83,7 +83,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, static int DetectSshProtocolSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-ssh-software.c b/src/detect-ssh-software.c index ac7b1973ce..cd11c5c209 100644 --- a/src/detect-ssh-software.c +++ b/src/detect-ssh-software.c @@ -83,7 +83,7 @@ static InspectionBuffer *GetSshData(DetectEngineThreadCtx *det_ctx, static int DetectSshSoftwareSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg) { - if (DetectBufferSetActiveList(s, g_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_SSH) < 0) diff --git a/src/detect-tcphdr.c b/src/detect-tcphdr.c index 4b6a65986d..f054e35509 100644 --- a/src/detect-tcphdr.c +++ b/src/detect-tcphdr.c @@ -88,7 +88,7 @@ static int DetectTcphdrSetup (DetectEngineCtx *de_ctx, Signature *s, const char s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_tcphdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tcphdr_buffer_id) < 0) return -1; return 0; diff --git a/src/detect-tls-cert-fingerprint.c b/src/detect-tls-cert-fingerprint.c index 83e802b065..b459c440ce 100644 --- a/src/detect-tls-cert-fingerprint.c +++ b/src/detect-tls-cert-fingerprint.c @@ -122,7 +122,7 @@ void DetectTlsFingerprintRegister(void) static int DetectTlsFingerprintSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_cert_fingerprint_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_cert_fingerprint_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-cert-issuer.c b/src/detect-tls-cert-issuer.c index 73044f7411..9146f8d0f4 100644 --- a/src/detect-tls-cert-issuer.c +++ b/src/detect-tls-cert-issuer.c @@ -112,7 +112,7 @@ void DetectTlsIssuerRegister(void) */ static int DetectTlsIssuerSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_cert_issuer_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_cert_issuer_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-cert-serial.c b/src/detect-tls-cert-serial.c index 51c61dbf0e..be03423d39 100644 --- a/src/detect-tls-cert-serial.c +++ b/src/detect-tls-cert-serial.c @@ -121,7 +121,7 @@ void DetectTlsSerialRegister(void) */ static int DetectTlsSerialSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_cert_serial_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_cert_serial_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-cert-subject.c b/src/detect-tls-cert-subject.c index ee6a13d345..282ecd10e1 100644 --- a/src/detect-tls-cert-subject.c +++ b/src/detect-tls-cert-subject.c @@ -110,7 +110,7 @@ void DetectTlsSubjectRegister(void) */ static int DetectTlsSubjectSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_cert_subject_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_cert_subject_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-certs.c b/src/detect-tls-certs.c index 08bf6af2bd..a5e7a11cea 100644 --- a/src/detect-tls-certs.c +++ b/src/detect-tls-certs.c @@ -126,7 +126,7 @@ void DetectTlsCertsRegister(void) static int DetectTlsCertsSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_certs_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_certs_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-ja3-hash.c b/src/detect-tls-ja3-hash.c index 8b9ce947fe..8aa1f58f30 100644 --- a/src/detect-tls-ja3-hash.c +++ b/src/detect-tls-ja3-hash.c @@ -116,7 +116,7 @@ void DetectTlsJa3HashRegister(void) */ static int DetectTlsJa3HashSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_ja3_hash_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_ja3_hash_buffer_id) < 0) return -1; if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_TLS && s->alproto != ALPROTO_QUIC) { diff --git a/src/detect-tls-ja3-string.c b/src/detect-tls-ja3-string.c index 85df070659..87a61bfd87 100644 --- a/src/detect-tls-ja3-string.c +++ b/src/detect-tls-ja3-string.c @@ -105,7 +105,7 @@ void DetectTlsJa3StringRegister(void) */ static int DetectTlsJa3StringSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_ja3_str_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_ja3_str_buffer_id) < 0) return -1; if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_TLS && s->alproto != ALPROTO_QUIC) { diff --git a/src/detect-tls-ja3s-hash.c b/src/detect-tls-ja3s-hash.c index 68be626aa1..93dc9e24ab 100644 --- a/src/detect-tls-ja3s-hash.c +++ b/src/detect-tls-ja3s-hash.c @@ -114,7 +114,7 @@ void DetectTlsJa3SHashRegister(void) */ static int DetectTlsJa3SHashSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_ja3s_hash_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_ja3s_hash_buffer_id) < 0) return -1; if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_TLS && s->alproto != ALPROTO_QUIC) { diff --git a/src/detect-tls-ja3s-string.c b/src/detect-tls-ja3s-string.c index db9ba3f101..0f7f7d61d0 100644 --- a/src/detect-tls-ja3s-string.c +++ b/src/detect-tls-ja3s-string.c @@ -105,7 +105,7 @@ void DetectTlsJa3SStringRegister(void) */ static int DetectTlsJa3SStringSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_ja3s_str_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_ja3s_str_buffer_id) < 0) return -1; if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_TLS && s->alproto != ALPROTO_QUIC) { diff --git a/src/detect-tls-random.c b/src/detect-tls-random.c index 40be3fe871..fc4369ab18 100644 --- a/src/detect-tls-random.c +++ b/src/detect-tls-random.c @@ -150,7 +150,7 @@ void DetectTlsRandomRegister(void) */ static int DetectTlsRandomTimeSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_random_time_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_random_time_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) @@ -171,7 +171,7 @@ static int DetectTlsRandomTimeSetup(DetectEngineCtx *de_ctx, Signature *s, const */ static int DetectTlsRandomBytesSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_random_bytes_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_random_bytes_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) @@ -192,7 +192,7 @@ static int DetectTlsRandomBytesSetup(DetectEngineCtx *de_ctx, Signature *s, cons */ static int DetectTlsRandomSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_random_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_random_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-tls-sni.c b/src/detect-tls-sni.c index eb3f385c56..69b066e8e9 100644 --- a/src/detect-tls-sni.c +++ b/src/detect-tls-sni.c @@ -98,7 +98,7 @@ void DetectTlsSniRegister(void) */ static int DetectTlsSniSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str) { - if (DetectBufferSetActiveList(s, g_tls_sni_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_tls_sni_buffer_id) < 0) return -1; if (DetectSignatureSetAppProto(s, ALPROTO_TLS) < 0) diff --git a/src/detect-udphdr.c b/src/detect-udphdr.c index 6c58a8883c..8aa645b926 100644 --- a/src/detect-udphdr.c +++ b/src/detect-udphdr.c @@ -86,7 +86,7 @@ static int DetectUdphdrSetup (DetectEngineCtx *de_ctx, Signature *s, const char s->flags |= SIG_FLAG_REQUIRE_PACKET; - if (DetectBufferSetActiveList(s, g_udphdr_buffer_id) < 0) + if (DetectBufferSetActiveList(de_ctx, s, g_udphdr_buffer_id) < 0) return -1; return 0;