Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90401
b: refs/heads/master
c: 1577519
h: refs/heads/master
i:
  90399: 57a66cc
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Mar 26, 2008
1 parent fd8746a commit 3fa6616
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5aa23fd49063745f85644dd7a9330acd706add6
refs/heads/master: 1577519d6b3777d2d3ba05871dd7ee40112c58ce
24 changes: 23 additions & 1 deletion trunk/net/ipv4/sysctl_net_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,34 @@ struct ctl_path net_ipv4_ctl_path[] = {
};
EXPORT_SYMBOL_GPL(net_ipv4_ctl_path);

static __net_init int ipv4_sysctl_init_net(struct net *net)
{
return 0;
}

static __net_exit void ipv4_sysctl_exit_net(struct net *net)
{
}

static __net_initdata struct pernet_operations ipv4_sysctl_ops = {
.init = ipv4_sysctl_init_net,
.exit = ipv4_sysctl_exit_net,
};

static __init int sysctl_ipv4_init(void)
{
struct ctl_table_header *hdr;

hdr = register_sysctl_paths(net_ipv4_ctl_path, ipv4_table);
return hdr == NULL ? -ENOMEM : 0;
if (hdr == NULL)
return -ENOMEM;

if (register_pernet_subsys(&ipv4_sysctl_ops)) {
unregister_sysctl_table(hdr);
return -ENOMEM;
}

return 0;
}

__initcall(sysctl_ipv4_init);

0 comments on commit 3fa6616

Please sign in to comment.