From eec8fdf57f34fe0d80b884ad0e376ed24c63ffcc Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 25 Jan 2009 17:52:56 +0100 Subject: src: change behaviour of `-t' option With this patch, the `-t' option adds an alarm that will flush the cache after CONFIG(purge_timeout) seconds specified in the config file. This looks much cleaner and more performance that looping on the entire conntrack table to set the new timeout of every single entry. Signed-off-by: Pablo Neira Ayuso --- include/cache.h | 1 - include/conntrackd.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/cache.h b/include/cache.h index bb0ca4d..5e96dd3 100644 --- a/include/cache.h +++ b/include/cache.h @@ -126,6 +126,5 @@ void cache_dump(struct cache *c, int fd, int type); void cache_commit(struct cache *c); void cache_flush(struct cache *c); void cache_bulk(struct cache *c); -void cache_reset_timers(struct cache *c); #endif diff --git a/include/conntrackd.h b/include/conntrackd.h index 99b9caa..3e10a2f 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -158,6 +158,8 @@ struct ct_sync_state { struct nlif_handle *mcast_iface; struct queue *tx_queue; + struct alarm_block reset_cache_alarm; + struct sync_mode *sync; /* sync mode */ /* statistics */ -- cgit v1.2.3