From: Victor Julien Date: Sat, 2 Dec 2023 08:44:58 +0000 (+0100) Subject: detect/dns.query: use new content inspect entry X-Git-Tag: suricata-8.0.0-beta1~1957 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ab95cbe2a1a6c4348ac7212c01df6afc2a3e88;p=thirdparty%2Fsuricata.git detect/dns.query: use new content inspect entry --- diff --git a/src/detect-dns-query.c b/src/detect-dns-query.c index a0bf46f386..43e1595e49 100644 --- a/src/detect-dns-query.c +++ b/src/detect-dns-query.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2018 Open Information Security Foundation +/* Copyright (C) 2013-2023 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -92,6 +92,7 @@ static InspectionBuffer *DnsQueryGetData(DetectEngineThreadCtx *det_ctx, return NULL; } InspectionBufferSetupMulti(buffer, transforms, data, data_len); + buffer->flags = DETECT_CI_FLAGS_SINGLE; SCReturnPtr(buffer, "InspectionBuffer"); } @@ -114,9 +115,8 @@ static uint8_t DetectEngineInspectDnsQuery(DetectEngineCtx *de_ctx, DetectEngine if (buffer == NULL || buffer->inspect == NULL) break; - const bool match = DetectEngineContentInspection(de_ctx, det_ctx, s, engine->smd, NULL, f, - buffer->inspect, buffer->inspect_len, buffer->inspect_offset, - DETECT_CI_FLAGS_SINGLE, DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE); + const bool match = DetectEngineContentInspectionBuffer(de_ctx, det_ctx, s, engine->smd, + NULL, f, buffer, DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE); if (match) { return DETECT_ENGINE_INSPECT_SIG_MATCH; }