]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove never set SIGMATCH_NOT_BUILT
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 5 Mar 2025 16:26:49 +0000 (17:26 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 19 Apr 2025 16:20:02 +0000 (18:20 +0200)
src/detect-engine-register.c
src/detect.h

index cb3d1bf4c48f54e5031999e3d41ebd653c819532..00644e1e97b362b42ce51002407b746c9ac8425a 100644 (file)
@@ -361,10 +361,6 @@ static void SigMultilinePrint(int i, const char *prefix)
 bool SigTableHasKeyword(const char *keyword)
 {
     for (int i = 0; i < DETECT_TBLSIZE; i++) {
-        if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) {
-            continue;
-        }
-
         const char *name = sigmatch_table[i].name;
 
         if (name == NULL || strlen(name) == 0) {
@@ -392,11 +388,7 @@ int SigTableList(const char *keyword)
                 if (name[0] == '_' || strcmp(name, "template") == 0)
                     continue;
 
-                if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) {
-                    printf("- %s (not built-in)\n", name);
-                } else {
-                    printf("- %s\n", name);
-                }
+                printf("- %s\n", name);
             }
         }
     } else if (strcmp("csv", keyword) == 0) {
@@ -404,9 +396,6 @@ int SigTableList(const char *keyword)
         for (i = 0; i < size; i++) {
             const char *name = sigmatch_table[i].name;
             if (name != NULL && strlen(name) > 0) {
-                if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) {
-                    continue;
-                }
                 if (name[0] == '_' || strcmp(name, "template") == 0)
                     continue;
 
@@ -440,10 +429,6 @@ int SigTableList(const char *keyword)
             if ((sigmatch_table[i].name != NULL) &&
                 strcmp(sigmatch_table[i].name, keyword) == 0) {
                 printf("= %s =\n", sigmatch_table[i].name);
-                if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) {
-                    printf("Not built-in\n");
-                    return TM_ECODE_FAILED;
-                }
                 SigMultilinePrint(i, "");
                 return TM_ECODE_DONE;
             }
index a663bf07fa85ff0433208f424b5c7b8a26a73861..e84c4ba90d7a8d24947ea8bf4057f25c2fa29227 100644 (file)
@@ -1594,8 +1594,9 @@ typedef struct SigGroupHead_ {
 #define SIGMATCH_IPONLY_COMPAT          BIT_U16(1)
 /** sigmatch is compatible with a decode event only rule */
 #define SIGMATCH_DEONLY_COMPAT          BIT_U16(2)
-/**< Flag to indicate that the signature is not built-in */
-#define SIGMATCH_NOT_BUILT              BIT_U16(3)
+
+// vacancy
+
 /** sigmatch may have options, so the parser should be ready to
  *  deal with both cases */
 #define SIGMATCH_OPTIONAL_OPT           BIT_U16(4)