Merge in SNORT/snort3 from ~OSERHIIE/snort3:bug_CSCvx76013 to master
Squashed commit of the following:
commit
48030fe21edd2181ff9c642b9f43f75ce965ef28
Author: Oleksandr Serhiienko <oserhiie@cisco.com>
Date: Fri May 27 10:12:26 2022 +0300
perf_monitor: fix timestamp for idle processing
This change provides a fix for the case when traffic has been stopped
somewhere in the middle of reporting interval.
If it happens, reporting falls into idle processing and still makes
records in time but logged timestamp value is wrong since it was not
updated for trackers since the last packet gone.
Subsequent time intervals are fine.
{
if ((cur_time - sample_time) >= t_constraints->sample_interval)
{
- if (cnt == 0)
+ if (!p)
for (auto& tracker : *trackers)
tracker->update_time(cur_time);