From: Victor Julien Date: Sun, 17 Dec 2023 18:54:43 +0000 (+0100) Subject: detect/bytetest: remove unused Match function X-Git-Tag: suricata-8.0.0-beta1~1877 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd75aca1a1fbc4c877f6bcd66240cf777ab7b5bb;p=thirdparty%2Fsuricata.git detect/bytetest: remove unused Match function All matching is done as part of content inspection. --- diff --git a/src/detect-bytetest.c b/src/detect-bytetest.c index 481eb51136..e637c5999c 100644 --- a/src/detect-bytetest.c +++ b/src/detect-bytetest.c @@ -68,8 +68,6 @@ static DetectParseRegex parse_regex; -static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx, - Packet *p, const Signature *s, const SigMatchCtx *ctx); static int DetectBytetestSetup(DetectEngineCtx *de_ctx, Signature *s, const char *optstr); static void DetectBytetestFree(DetectEngineCtx *, void *ptr); #ifdef UNITTESTS @@ -81,7 +79,6 @@ void DetectBytetestRegister (void) sigmatch_table[DETECT_BYTETEST].name = "byte_test"; sigmatch_table[DETECT_BYTETEST].desc = "extract and perform an operation selected with against the value in at a particular "; sigmatch_table[DETECT_BYTETEST].url = "/rules/payload-keywords.html#byte-test"; - sigmatch_table[DETECT_BYTETEST].Match = DetectBytetestMatch; sigmatch_table[DETECT_BYTETEST].Setup = DetectBytetestSetup; sigmatch_table[DETECT_BYTETEST].Free = DetectBytetestFree; #ifdef UNITTESTS @@ -313,13 +310,6 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx, const Signature *s, } -static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx, - Packet *p, const Signature *s, const SigMatchCtx *ctx) -{ - return DetectBytetestDoMatch(det_ctx, s, ctx, p->payload, p->payload_len, - ((DetectBytetestData *)ctx)->flags, 0, 0, 0); -} - static DetectBytetestData *DetectBytetestParse( const char *optstr, char **value, char **offset, char **nbytes_str) {