From: Victor Julien Date: Mon, 23 Dec 2019 19:22:37 +0000 (+0100) Subject: flow-manager: only update FlowBucket::next_ts if it changed X-Git-Tag: suricata-6.0.0-beta1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6814f08e937e846cd25430d7fa500f62fb1c3d67;p=thirdparty%2Fsuricata.git flow-manager: only update FlowBucket::next_ts if it changed --- diff --git a/src/flow-manager.c b/src/flow-manager.c index 83672d48c7..b8bb87acef 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -483,7 +483,9 @@ static uint32_t FlowTimeoutHash(struct timeval *ts, uint32_t try_cnt, /* we have a flow, or more than one */ cnt += FlowManagerHashRowTimeout(fb->tail, ts, emergency, counters, &next_ts); - SC_ATOMIC_SET(fb->next_ts, next_ts); + if (SC_ATOMIC_GET(fb->next_ts) != next_ts) { + SC_ATOMIC_SET(fb->next_ts, next_ts); + } next: FBLOCK_UNLOCK(fb);