]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
netfilter: conntrack: remove unused init_net hook
authorFlorian Westphal <fw@strlen.de>
Tue, 15 Nov 2016 20:36:39 +0000 (21:36 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 4 Dec 2016 20:16:41 +0000 (21:16 +0100)
since adf0516845bcd0 ("netfilter: remove ip_conntrack* sysctl compat code")
the only user (ipv4 tracker) sets this to an empty stub function.

After this change nf_ct_l3proto_pernet_register() is also empty,
but this will change in a followup patch to add conditional register
of the hooks.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_l3proto.h
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/netfilter/nf_conntrack_proto.c

index 8992e4229da95a07b771736a317d253f4fd2a61c..cf8f3dfd810dffa6ddda317c03a3ba4d576a76c9 100644 (file)
@@ -63,9 +63,6 @@ struct nf_conntrack_l3proto {
 
        size_t nla_size;
 
-       /* Init l3proto pernet data */
-       int (*init_net)(struct net *net);
-
        /* Module (if any) which this is connected to. */
        struct module *me;
 };
index 22fce4fcece4e59478421d0d010ffa63ce9ab3af..a006b6534323eb84ca0479869191dbac53affd6b 100644 (file)
@@ -307,11 +307,6 @@ static struct nf_sockopt_ops so_getorigdst = {
        .owner          = THIS_MODULE,
 };
 
-static int ipv4_init_net(struct net *net)
-{
-       return 0;
-}
-
 struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
        .l3proto         = PF_INET,
        .name            = "ipv4",
@@ -325,7 +320,6 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
        .nlattr_to_tuple = ipv4_nlattr_to_tuple,
        .nla_policy      = ipv4_nla_policy,
 #endif
-       .init_net        = ipv4_init_net,
        .me              = THIS_MODULE,
 };
 
index 9bd34647225a2a22304ab780ff80221642d27251..b218e70b2f747586aa70d643770603755cec2829 100644 (file)
@@ -193,14 +193,6 @@ EXPORT_SYMBOL_GPL(nf_ct_l3proto_register);
 int nf_ct_l3proto_pernet_register(struct net *net,
                                  struct nf_conntrack_l3proto *proto)
 {
-       int ret;
-
-       if (proto->init_net) {
-               ret = proto->init_net(net);
-               if (ret < 0)
-                       return ret;
-       }
-
        return 0;
 }
 EXPORT_SYMBOL_GPL(nf_ct_l3proto_pernet_register);