]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit284f74d75deef83fc4720b0ba73de11067692f85
treed548a9cf389503cda06a1752846c94039cce9ad0
parent412985764f3ca5bcf96c1b488f64f104bd878405
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