netfilter: move nf_ct_netns_get out of nf_conncount_init
authorXin Long <lucien.xin@gmail.com>
Thu, 18 Jul 2024 02:09:44 +0000 (22:09 -0400)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 19 Aug 2024 16:44:51 +0000 (18:44 +0200)
commitd5283b47e225e1473e1a07085b9c4e6bfd08ba51
tree81512090deca609447412a28ebc16a2245ff3d42
parentc9526aeb4998393171d85225ff540e28c7d4ab86
netfilter: move nf_ct_netns_get out of nf_conncount_init

This patch is to move nf_ct_netns_get() out of nf_conncount_init()
and let the consumers of nf_conncount decide if they want to turn
on netfilter conntrack.

It makes nf_conncount more flexible to be used in other places and
avoids netfilter conntrack turned on when using it in openvswitch
conntrack.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-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/xt_connlimit.c
net/openvswitch/conntrack.c