aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-11-15 15:36:40 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2016-12-04 15:16:50 -0500
commitecb2421b5ddf48e6e116fced7f74c985bb546138 (patch)
tree0fdfc2639bead099d3e54c2d5731eb05e856f766 /include
parenta379854d91b2cb0af07b0f62845449f4dacbd673 (diff)
netfilter: add and use nf_ct_netns_get/put
currently aliased to try_module_get/_put. Will be changed in next patch when we add functions to make use of ->net argument to store usercount per l3proto tracker. This is needed to avoid registering the conntrack hooks in all netns and later only enable connection tracking in those that need conntrack. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/netfilter/nf_conntrack.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index d9d52c020a70..5916aa9ab3f0 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -181,6 +181,10 @@ static inline void nf_ct_put(struct nf_conn *ct)
181int nf_ct_l3proto_try_module_get(unsigned short l3proto); 181int nf_ct_l3proto_try_module_get(unsigned short l3proto);
182void nf_ct_l3proto_module_put(unsigned short l3proto); 182void nf_ct_l3proto_module_put(unsigned short l3proto);
183 183
184/* load module; enable/disable conntrack in this namespace */
185int nf_ct_netns_get(struct net *net, u8 nfproto);
186void nf_ct_netns_put(struct net *net, u8 nfproto);
187
184/* 188/*
185 * Allocate a hashtable of hlist_head (if nulls == 0), 189 * Allocate a hashtable of hlist_head (if nulls == 0),
186 * or hlist_nulls_head (if nulls == 1) 190 * or hlist_nulls_head (if nulls == 1)