]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conncount: Early exit in nf_conncount_lookup() and cleanup
authorYi-Hung Wei <yihung.wei@gmail.com>
Tue, 3 Jul 2018 00:33:41 +0000 (17:33 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Jul 2018 09:26:34 +0000 (11:26 +0200)
commitecaa7c32165ace6ab99944ff454cb103a7570538
treed9d3e71727e1bc05208535ae8ef6fd8ea51540e7
parent05f4281742974df32c6479e9883d4dea68ea4f5b
netfilter: nf_conncount: Early exit in nf_conncount_lookup() and cleanup

This patch is originally from Florian Westphal.

This patch does the following three tasks.

It applies the same early exit technique for nf_conncount_lookup().

Since now we keep the number of connections in 'struct nf_conncount_list',
we no longer need to return the count in nf_conncount_lookup().

Moreover, we expose the garbage collection function nf_conncount_gc_list()
for nft_connlimit.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_count.h
net/netfilter/nf_conncount.c
net/netfilter/nft_connlimit.c