From 6356d191a6d97483ad904fa1c8279a30564220cf Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 1 Aug 2008 14:35:47 +0200 Subject: fix broken normal deletion in caches This patch fixes the non-timer-based cache deletion. This bug affects the alarm-based approach since the backup replicas did not get the deletion event, thus, delaying the deletion. This patch introduces cache_find() to look up for a conntrack object and __cache_del_timer() to perform direct deletions by means of the pointer obtained with cache_find(). Signed-off-by: Pablo Neira Ayuso --- include/cache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/cache.h') diff --git a/include/cache.h b/include/cache.h index 442a563..e2e2e34 100644 --- a/include/cache.h +++ b/include/cache.h @@ -82,7 +82,8 @@ struct us_conntrack *cache_add(struct cache *c, struct nf_conntrack *ct); struct us_conntrack *cache_update(struct cache *c, struct nf_conntrack *ct); struct us_conntrack *cache_update_force(struct cache *c, struct nf_conntrack *ct); int cache_del(struct cache *c, struct nf_conntrack *ct); -struct us_conntrack *cache_del_timeout(struct cache *c, struct nf_conntrack *ct, int timeout); +int __cache_del_timer(struct cache *c, struct us_conntrack *u, int timeout); +struct us_conntrack *cache_find(struct cache *c, struct nf_conntrack *ct); int cache_test(struct cache *c, struct nf_conntrack *ct); void cache_stats(const struct cache *c, int fd); struct us_conntrack *cache_get_conntrack(struct cache *, void *); -- cgit v1.2.3