]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/bytetest: remove unused Match function
authorVictor Julien <vjulien@oisf.net>
Sun, 17 Dec 2023 18:54:43 +0000 (19:54 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 8 Jan 2024 19:23:28 +0000 (20:23 +0100)
All matching is done as part of content inspection.

src/detect-bytetest.c

index 481eb51136db84eac3ba97cc79678a1c37f87b71..e637c5999ce6281af0e0858c52436606babad852 100644 (file)
@@ -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 <num of bytes> and perform an operation selected with <operator> against the value in <test value> at a particular <offset>";
     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)
 {