From d1240630b36910b28587f78369854deae2314d9e Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Sat, 5 Feb 2005 10:00:04 +0000 Subject: [PATCH] Expire aged flows in normal expiry thread. This fixes the problem, when a node disconnected from all sources of traffic never purges its cache. --- sys/netgraph/netflow/netflow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index 27162b7207b2..cc4fbf31e6a6 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -701,7 +701,8 @@ ng_netflow_expire(void *arg) if (used <= CACHELOWAT && !INACTIVE(fle)) goto finish; - if (INACTIVE(fle) && (SMALL(fle) || (used > CACHELOWAT))) { + if ((INACTIVE(fle) && (SMALL(fle) || (used > CACHELOWAT))) || + AGED(fle)) { /* Detach flow entry from cache */ LIST_REMOVE(fle, fle_hash);