detect/engine: init alert queue counters on reload

alert_queue_overflow and alerts_suppressed were not being
reinitialized when there was a reload of Suricata rules, leading to
non-valid stats counters if that happened.

Bug #5457

(cherry picked from commit 93c2c9743d)
pull/7659/head
Jufajardini Reichow 4 years ago committed by Victor Julien
parent b8875d4a22
commit 41967bf119

@ -2934,6 +2934,8 @@ static DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
/** alert counter setup */
det_ctx->counter_alerts = StatsRegisterCounter("detect.alert", tv);
det_ctx->counter_alerts_overflow = StatsRegisterCounter("detect.alert_queue_overflow", tv);
det_ctx->counter_alerts_suppressed = StatsRegisterCounter("detect.alerts_suppressed", tv);
#ifdef PROFILING
uint16_t counter_mpm_list = StatsRegisterAvgCounter("detect.mpm_list", tv);
uint16_t counter_nonmpm_list = StatsRegisterAvgCounter("detect.nonmpm_list", tv);

Loading…
Cancel
Save