Project

General

Profile

Bug #453 » 0002-fix-detection-filter.-Had-one-extra-alert-than-norma.patch

Anoop Saldanha, 04/24/2012 11:41 AM

View differences:

src/detect-engine-threshold.c
/* within timeout */
lookup_tsh->current_count++;
if (lookup_tsh->current_count >= td->count) {
if (lookup_tsh->current_count > td->count) {
ret = 1;
}
} else {
......
lookup_tsh->tv_sec1 = p->ts.tv_sec;
lookup_tsh->current_count = 1;
if (td->count == 1) {
ret = 1;
}
}
} else {
if (td->count == 1) {
ret = 1;
}
DetectThresholdEntry *e = DetectThresholdEntryAlloc(td, p, sid, gid);
if (e == NULL) {
break;
(3-3/6)