netfilter: evict stale entries on netlink dumps
authorFlorian Westphal <fw@strlen.de>
Thu, 25 Aug 2016 13:33:32 +0000 (15:33 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Aug 2016 09:43:09 +0000 (11:43 +0200)
commit2344d64ec71661f7201082cf727a7154f662e249
treed548a9cf389503cda06a1752846c94039cce9ad0
parentf330a7fdbe1611104622faff7e614a246a7d20f0
netfilter: evict stale entries on netlink dumps

When dumping we already have to look at the entire table, so we might
as well toss those entries whose timeout value is in the past.

We also look at every entry during resize operations.
However, eviction there is not as simple because we hold the
global resize lock so we can't evict without adding a 'expired' list
to drop from later.  Considering that resizes are very rare it doesn't
seem worth doing it.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c