summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-02-05 10:00:04 +0000
committerglebius <glebius@FreeBSD.org>2005-02-05 10:00:04 +0000
commitbecc1a2274061620b5fe4831b2ebf069492c44dd (patch)
treef9e34fe63c47bd0e61f5c96e165b722b286899c6
parent896de17746bde9823f376e7315be1f18e2f76122 (diff)
downloadFreeBSD-src-becc1a2274061620b5fe4831b2ebf069492c44dd.zip
FreeBSD-src-becc1a2274061620b5fe4831b2ebf069492c44dd.tar.gz
Expire aged flows in normal expiry thread. This fixes the problem, when
a node disconnected from all sources of traffic never purges its cache.
-rw-r--r--sys/netgraph/netflow/netflow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index 27162b7..cc4fbf3 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);
OpenPOWER on IntegriCloud