Properly detect detect-event-only sigs.

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent 21d79b05ad
commit a492518e7a

@ -1335,14 +1335,19 @@ static int SignatureIsDEOnly(DetectEngineCtx *de_ctx, Signature *s) {
}
SigMatch *sm = s->match;
if (sm == NULL)
goto deonly;
/* check for conflicting keywords */
for ( ;sm != NULL; sm = sm->next) {
if ( !(sigmatch_table[sm->type].flags & SIGMATCH_DEONLY_COMPAT))
return 0;
}
/* need at least one decode event keyword to be condered decode event. */
for ( ;sm != NULL; sm = sm->next) {
if (sm->type == DETECT_DECODE_EVENT)
goto deonly;
}
return 0;
deonly:
if (!(de_ctx->flags & DE_QUIET)) {
SCLogDebug("DE-ONLY (%" PRIu32 "): source %s, dest %s", s->id,

Loading…
Cancel
Save