[conntrack-tools PATCH] sync-mode: Also cancel flush timer in ALL_FLUSH_CACHE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/sync-mode.c | 2 ++
 1 file changed, 2 insertions(+)

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();
-- 
2.20.1



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux