Skip to content

Commit a379854

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: conntrack: remove unused init_net hook
since adf0516 ("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>
1 parent 9b91c96 commit a379854

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎include/net/netfilter/nf_conntrack_l3proto.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ struct nf_conntrack_l3proto {
6363

6464
size_t nla_size;
6565

66-
/* Init l3proto pernet data */
67-
int (*init_net)(struct net *net);
68-
6966
/* Module (if any) which this is connected to. */
7067
struct module *me;
7168
};

‎net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,6 @@ static struct nf_sockopt_ops so_getorigdst = {
307307
.owner = THIS_MODULE,
308308
};
309309

310-
static int ipv4_init_net(struct net *net)
311-
{
312-
return 0;
313-
}
314-
315310
struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
316311
.l3proto = PF_INET,
317312
.name = "ipv4",
@@ -325,7 +320,6 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
325320
.nlattr_to_tuple = ipv4_nlattr_to_tuple,
326321
.nla_policy = ipv4_nla_policy,
327322
#endif
328-
.init_net = ipv4_init_net,
329323
.me = THIS_MODULE,
330324
};
331325

‎net/netfilter/nf_conntrack_proto.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,6 @@ EXPORT_SYMBOL_GPL(nf_ct_l3proto_register);
193193
int nf_ct_l3proto_pernet_register(struct net *net,
194194
struct nf_conntrack_l3proto *proto)
195195
{
196-
int ret;
197-
198-
if (proto->init_net) {
199-
ret = proto->init_net(net);
200-
if (ret < 0)
201-
return ret;
202-
}
203-
204196
return 0;
205197
}
206198
EXPORT_SYMBOL_GPL(nf_ct_l3proto_pernet_register);

0 commit comments

Comments
 (0)