summaryrefslogtreecommitdiff
path: root/src/sync-mode.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-02-08 19:41:23 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-02-08 19:41:23 +0100
commit9c3690c82cc394214b0026157cb9ab1885542ec9 (patch)
tree9de263a60c36604c828cb466a1159e85b5a714c0 /src/sync-mode.c
parentf3464ea99081fbe4f429f030ea99c60e2338c047 (diff)
downloadconntrack-tools-9c3690c82cc394214b0026157cb9ab1885542ec9.tar.gz
conntrack-tools-9c3690c82cc394214b0026157cb9ab1885542ec9.zip
sync-mode: flush also internal cache after reset PurgeTimeout
Currently, the daemon sends a flush request to the kernel-space. With lots of entries and NetlinkOverrunResync disabled, the daemon remains in an inconsistent state due to an overrun produced by the flush report to userspace. With this patch, the daemon also flush its internal cache after the kernel flush request. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r--src/sync-mode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c
index 8174681..63948f1 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -210,6 +210,7 @@ static void do_reset_cache_alarm(struct alarm_block *a, void *data)
STATE(stats).nl_kernel_table_flush++;
dlog(LOG_NOTICE, "flushing kernel conntrack table (scheduled)");
nl_flush_conntrack_table(STATE(request));
+ cache_flush(STATE_SYNC(internal));
}
static int init_sync(void)