Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78723
b: refs/heads/master
c: 81c1c17
h: refs/heads/master
i:
  78721: ca2b04b
  78719: 62cc4c7
v: v3
  • Loading branch information
Daniel Lezcano authored and David S. Miller committed Jan 28, 2008
1 parent 7be1862 commit c5da934
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 291480c09a9452a3d8852a9bfeb5ba2cbcfe662c
refs/heads/master: 81c1c17804ac52036e07b0ba95cb637bdd4784d6
22 changes: 22 additions & 0 deletions trunk/net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,21 @@ static void cleanup_ipv6_mibs(void)
snmp_mib_free((void **)udplite_stats_in6);
}

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

static void inet6_net_exit(struct net *net)
{
return;
}

static struct pernet_operations inet6_net_ops = {
.init = inet6_net_init,
.exit = inet6_net_exit,
};

static int __init inet6_init(void)
{
struct sk_buff *dummy_skb;
Expand Down Expand Up @@ -782,6 +797,10 @@ static int __init inet6_init(void)
* able to communicate via both network protocols.
*/

err = register_pernet_subsys(&inet6_net_ops);
if (err)
goto register_pernet_fail;

#ifdef CONFIG_SYSCTL
err = ipv6_sysctl_register();
if (err)
Expand Down Expand Up @@ -901,6 +920,8 @@ static int __init inet6_init(void)
ipv6_sysctl_unregister();
sysctl_fail:
#endif
unregister_pernet_subsys(&inet6_net_ops);
register_pernet_fail:
cleanup_ipv6_mibs();
out_unregister_sock:
sock_unregister(PF_INET6);
Expand Down Expand Up @@ -956,6 +977,7 @@ static void __exit inet6_exit(void)
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
#endif
unregister_pernet_subsys(&inet6_net_ops);
cleanup_ipv6_mibs();
proto_unregister(&rawv6_prot);
proto_unregister(&udplitev6_prot);
Expand Down

0 comments on commit c5da934

Please sign in to comment.