aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-03-21 04:14:45 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-21 04:14:45 -0700
commit6f8b13bcb3369a5df2e63acc422bed6098f5b8c4 (patch)
tree715d53b85e86b26c113b417e269602d1cb8ca436 /net/ipv6/af_inet6.c
parent0c96d8c50bffb7f02690dd8a8cf1adb8e07e100f (diff)
downloadlinux-2.6.38-lt-ux500-6f8b13bcb3369a5df2e63acc422bed6098f5b8c4.tar.gz
[NETNS][IPV6] tcp6 - make proc per namespace
Make the proc for tcp6 to be per namespace. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e3e09147d13..f52bdaed8a1 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -859,15 +859,25 @@ static int inet6_net_init(struct net *net)
err = udp6_proc_init(net);
if (err)
goto out;
+ err = tcp6_proc_init(net);
+ if (err)
+ goto proc_tcp6_fail;
out:
#endif
return err;
+
+#ifdef CONFIG_PROC_FS
+proc_tcp6_fail:
+ udp6_proc_exit(net);
+ goto out;
+#endif
}
static void inet6_net_exit(struct net *net)
{
#ifdef CONFIG_PROC_FS
udp6_proc_exit(net);
+ tcp6_proc_exit(net);
#endif
}
@@ -951,8 +961,6 @@ static int __init inet6_init(void)
err = -ENOMEM;
if (raw6_proc_init())
goto proc_raw6_fail;
- if (tcp6_proc_init())
- goto proc_tcp6_fail;
if (udplite6_proc_init())
goto proc_udplite6_fail;
if (ipv6_misc_proc_init())
@@ -1037,8 +1045,6 @@ proc_anycast6_fail:
proc_misc6_fail:
udplite6_proc_exit();
proc_udplite6_fail:
- tcp6_proc_exit();
-proc_tcp6_fail:
raw6_proc_exit();
proc_raw6_fail:
#endif
@@ -1098,7 +1104,6 @@ static void __exit inet6_exit(void)
ac6_proc_exit();
ipv6_misc_proc_exit();
udplite6_proc_exit();
- tcp6_proc_exit();
raw6_proc_exit();
#endif
ipv6_netfilter_fini();