Treat negated MPM sigs as if non-MPM, so we consider them always.
As MPM results and non-MPM rules lists are now merged and considered
for further inspection, rules that need to be considerd when a pattern
is absent are caught in the middle.
As a HACK/workaround this patch adds them to the non-MPM list. This
causes them to be inspected each time.
if (s->mpm_sm == NULL)
non_mpm++;
+ else if (s->flags & (SIG_FLAG_MPM_PACKET_NEG|SIG_FLAG_MPM_STREAM_NEG|SIG_FLAG_MPM_APPLAYER_NEG))
+ non_mpm++;
}
if (non_mpm == 0) {
s = sgh->match_array[sig];
if (s == NULL)
continue;
- if (s->mpm_sm != NULL)
- continue;
- BUG_ON(sgh->non_mpm_id_cnt >= non_mpm);
- sgh->non_mpm_id_array[sgh->non_mpm_id_cnt++] = s->num;
+ if (s->mpm_sm == NULL) {
+ BUG_ON(sgh->non_mpm_id_cnt >= non_mpm);
+ sgh->non_mpm_id_array[sgh->non_mpm_id_cnt++] = s->num;
+ } else if (s->flags & (SIG_FLAG_MPM_PACKET_NEG|SIG_FLAG_MPM_STREAM_NEG|SIG_FLAG_MPM_APPLAYER_NEG)) {
+ BUG_ON(sgh->non_mpm_id_cnt >= non_mpm);
+ sgh->non_mpm_id_array[sgh->non_mpm_id_cnt++] = s->num;
+ }
}
return 0;
}