From: Eric Leblond Date: Wed, 5 Jun 2019 13:12:13 +0000 (+0200) Subject: bypass: fix accounting X-Git-Tag: suricata-5.0.0-rc1~307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bfbb4a88991a08115c28fdb4721f893d11b91ae;p=thirdparty%2Fsuricata.git bypass: fix accounting The flow bypass stats is computed at every pass so the accounting needs to be done at each pass. This patch fixes the accounting in the flow_bypassed counters. --- diff --git a/src/flow-bypass.c b/src/flow-bypass.c index ae7b2f621f..d15b44da40 100644 --- a/src/flow-bypass.c +++ b/src/flow-bypass.c @@ -85,9 +85,9 @@ static TmEcode BypassedFlowManager(ThreadVars *th_v, void *thread_data) tcount = bypassedfunclist[i].Func(th_v, &bypassstats, &curtime, bypassedfunclist[i].data); if (tcount) { StatsAddUI64(th_v, ftd->flow_bypassed_cnt_clo, (uint64_t)bypassstats.count); - StatsAddUI64(th_v, ftd->flow_bypassed_pkts, (uint64_t)bypassstats.packets); - StatsAddUI64(th_v, ftd->flow_bypassed_bytes, (uint64_t)bypassstats.bytes); } + StatsAddUI64(th_v, ftd->flow_bypassed_pkts, (uint64_t)bypassstats.packets); + StatsAddUI64(th_v, ftd->flow_bypassed_bytes, (uint64_t)bypassstats.bytes); } if (TmThreadsCheckFlag(th_v, THV_KILL)) {