From: Gianni Tedesco Date: Sun, 13 Dec 2020 14:50:23 +0000 (+0900) Subject: detect-fast-pattern: Mark as OPTIONAL_OPT, instead of NOOPT X-Git-Tag: suricata-5.0.6~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38ad4527e2a52232c1369e116850d77005dfa016;p=thirdparty%2Fsuricata.git detect-fast-pattern: Mark as OPTIONAL_OPT, instead of NOOPT Also update the erroneous comment about it. (cherry picked from commit cebe15c23b48e92df5181b3f0b0e6ac7195d717b) --- diff --git a/src/detect-fast-pattern.c b/src/detect-fast-pattern.c index afcdfc54b9..e656aa111a 100644 --- a/src/detect-fast-pattern.c +++ b/src/detect-fast-pattern.c @@ -170,9 +170,10 @@ void DetectFastPatternRegister(void) sigmatch_table[DETECT_FAST_PATTERN].Match = NULL; sigmatch_table[DETECT_FAST_PATTERN].Setup = DetectFastPatternSetup; sigmatch_table[DETECT_FAST_PATTERN].Free = NULL; +#ifdef UNITTESTS sigmatch_table[DETECT_FAST_PATTERN].RegisterTests = DetectFastPatternRegisterTests; - - sigmatch_table[DETECT_FAST_PATTERN].flags |= SIGMATCH_NOOPT; +#endif + sigmatch_table[DETECT_FAST_PATTERN].flags |= SIGMATCH_OPTIONAL_OPT; DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study); } @@ -185,7 +186,7 @@ void DetectFastPatternRegister(void) * * \param de_ctx Pointer to the Detection Engine Context. * \param s Pointer to the Signature to which the current keyword belongs. - * \param null_str Should hold an empty string always. + * \param arg May hold an argument * * \retval 0 On success. * \retval -1 On failure.