detect-hostbits: error on some invalid config

pull/3680/head
Eric Leblond 7 years ago committed by Victor Julien
parent e09fa43ba5
commit 2b1fa53c66

@ -61,7 +61,7 @@ TODO:
hostbits:set,bitname,both,120;
*/
#define PARSE_REGEX "([a-z]+)" /* Action */ \
#define PARSE_REGEX "^([a-z]+)" /* Action */ \
"(?:\\s*,\\s*([^\\s,]+))?(?:\\s*)?" /* Name. */ \
"(?:\\s*,\\s*([^,\\s]+))?(?:\\s*)?" /* Direction. */ \
"(.+)?" /* Any remainding data. */
@ -619,6 +619,10 @@ static int HostBitsTestSig02(void)
"alert ip any any -> any any (hostbits:isnotset,abc,dst; content:\"GET \"; sid:2;)");
FAIL_IF_NULL(s);
s = DetectEngineAppendSig(de_ctx,
"alert ip any any -> any any (hostbits:!isset,abc,dst; content:\"GET \"; sid:3;)");
FAIL_IF_NOT_NULL(s);
/* TODO reenable after both is supported
s = DetectEngineAppendSig(de_ctx,
"alert ip any any -> any any (hostbits:set,abc,both; content:\"GET \"; sid:3;)");

Loading…
Cancel
Save