aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_connlabel.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-11-15 21:36:40 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-12-04 21:16:50 +0100
commitecb2421b5ddf48e6e116fced7f74c985bb546138 (patch)
tree0fdfc2639bead099d3e54c2d5731eb05e856f766 /net/netfilter/xt_connlabel.c
parentnetfilter: conntrack: remove unused init_net hook (diff)
downloadlinux-dev-ecb2421b5ddf48e6e116fced7f74c985bb546138.tar.xz
linux-dev-ecb2421b5ddf48e6e116fced7f74c985bb546138.zip
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 'net/netfilter/xt_connlabel.c')
-rw-r--r--net/netfilter/xt_connlabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/xt_connlabel.c b/net/netfilter/xt_connlabel.c
index 03d66f1c5e69..7827128d5a95 100644
--- a/net/netfilter/xt_connlabel.c
+++ b/net/netfilter/xt_connlabel.c
@@ -61,7 +61,7 @@ static int connlabel_mt_check(const struct xt_mtchk_param *par)
return -EINVAL;
}
- ret = nf_ct_l3proto_try_module_get(par->family);
+ ret = nf_ct_netns_get(par->net, par->family);
if (ret < 0) {
pr_info("cannot load conntrack support for proto=%u\n",
par->family);
@@ -70,14 +70,14 @@ static int connlabel_mt_check(const struct xt_mtchk_param *par)
ret = nf_connlabels_get(par->net, info->bit);
if (ret < 0)
- nf_ct_l3proto_module_put(par->family);
+ nf_ct_netns_put(par->net, par->family);
return ret;
}
static void connlabel_mt_destroy(const struct xt_mtdtor_param *par)
{
nf_connlabels_put(par->net);
- nf_ct_l3proto_module_put(par->family);
+ nf_ct_netns_put(par->net, par->family);
}
static struct xt_match connlabels_mt_reg __read_mostly = {