summaryrefslogtreecommitdiffstats
path: root/src/sync-mode.c
diff options
context:
space:
mode:
authorSimon Kirby <sim@hostway.ca>2019-05-09 14:41:46 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-12 19:59:36 +0200
commit6abd0b7efdcd808167b95242d2f8cfdbd51f7e8e (patch)
treee2ce3827b1d2775c5c5e0d1e414484a2d028208c /src/sync-mode.c
parent8ae8c537cd7fd0f2fe18e30046d73c59d3a7fe85 (diff)
sync-mode: Also cancel flush timer in ALL_FLUSH_CACHE
This makes the behaviour of "conntrackd -f" match that of "conntrackd -f internal" with resepect to stopping a timer ("conntrackd -t") from possibly flushing again in the future. Signed-off-by: Simon Kirby <sim@hostway.ca> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r--src/sync-mode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c
index 082e2ce..29bedd6 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -708,6 +708,8 @@ static int local_handler_sync(int fd, int type, void *data)
"commit still in progress");
break;
}
+ /* inmediate flush, remove pending flush scheduled if any */
+ del_alarm(&STATE_SYNC(reset_cache_alarm));
dlog(LOG_NOTICE, "flushing caches");
STATE(mode)->internal->ct.flush();
STATE_SYNC(external)->ct.flush();