detect: forbids unsupported prefilters

pull/5886/head
Philippe Antoine 4 years ago committed by Victor Julien
parent e374d5ac15
commit b7fd01c86e

@ -71,6 +71,11 @@ static int DetectPrefilterSetup (DetectEngineCtx *de_ctx, Signature *s, const ch
SCLogError(SC_ERR_INVALID_SIGNATURE, "prefilter needs preceding match");
SCReturnInt(-1);
}
if (sigmatch_table[sm->type].SupportsPrefilter == NULL) {
SCLogError(SC_ERR_INVALID_SIGNATURE, "prefilter is not supported for %s",
sigmatch_table[sm->type].name);
SCReturnInt(-1);
}
s->init_data->prefilter_sm = sm;

Loading…
Cancel
Save