|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* Copyright (C) 2007-2010 Open Information Security Foundation
|
|
|
|
|
/* Copyright (C) 2007-2024 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
|
|
|
|
@ -27,10 +27,17 @@
|
|
|
|
|
#include "detect.h"
|
|
|
|
|
#include "detect-noalert.h"
|
|
|
|
|
#include "util-debug.h"
|
|
|
|
|
#include "util-validate.h"
|
|
|
|
|
|
|
|
|
|
static int DetectNoalertSetup (DetectEngineCtx *, Signature *, const char *);
|
|
|
|
|
static int DetectNoalertSetup(DetectEngineCtx *de_ctx, Signature *s, const char *nullstr)
|
|
|
|
|
{
|
|
|
|
|
DEBUG_VALIDATE_BUG_ON(nullstr != NULL);
|
|
|
|
|
|
|
|
|
|
s->flags |= SIG_FLAG_NOALERT;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DetectNoalertRegister (void)
|
|
|
|
|
void DetectNoalertRegister(void)
|
|
|
|
|
{
|
|
|
|
|
sigmatch_table[DETECT_NOALERT].name = "noalert";
|
|
|
|
|
sigmatch_table[DETECT_NOALERT].desc = "no alert will be generated by the rule";
|
|
|
|
@ -38,15 +45,3 @@ void DetectNoalertRegister (void)
|
|
|
|
|
sigmatch_table[DETECT_NOALERT].Setup = DetectNoalertSetup;
|
|
|
|
|
sigmatch_table[DETECT_NOALERT].flags |= SIGMATCH_NOOPT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int DetectNoalertSetup (DetectEngineCtx *de_ctx, Signature *s, const char *nullstr)
|
|
|
|
|
{
|
|
|
|
|
if (nullstr != NULL) {
|
|
|
|
|
SCLogError("nocase has no value");
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s->flags |= SIG_FLAG_NOALERT;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|