diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-03-21 07:14:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-21 07:14:45 -0400 |
commit | 6f8b13bcb3369a5df2e63acc422bed6098f5b8c4 (patch) | |
tree | 715d53b85e86b26c113b417e269602d1cb8ca436 /net/ipv6 | |
parent | 0c96d8c50bffb7f02690dd8a8cf1adb8e07e100f (diff) |
[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')
-rw-r--r-- | net/ipv6/af_inet6.c | 15 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 8 |
2 files changed, 14 insertions, 9 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index e3e09147d134..f52bdaed8a1b 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) | |||
859 | err = udp6_proc_init(net); | 859 | err = udp6_proc_init(net); |
860 | if (err) | 860 | if (err) |
861 | goto out; | 861 | goto out; |
862 | err = tcp6_proc_init(net); | ||
863 | if (err) | ||
864 | goto proc_tcp6_fail; | ||
862 | out: | 865 | out: |
863 | #endif | 866 | #endif |
864 | return err; | 867 | return err; |
868 | |||
869 | #ifdef CONFIG_PROC_FS | ||
870 | proc_tcp6_fail: | ||
871 | udp6_proc_exit(net); | ||
872 | goto out; | ||
873 | #endif | ||
865 | } | 874 | } |
866 | 875 | ||
867 | static void inet6_net_exit(struct net *net) | 876 | static void inet6_net_exit(struct net *net) |
868 | { | 877 | { |
869 | #ifdef CONFIG_PROC_FS | 878 | #ifdef CONFIG_PROC_FS |
870 | udp6_proc_exit(net); | 879 | udp6_proc_exit(net); |
880 | tcp6_proc_exit(net); | ||
871 | #endif | 881 | #endif |
872 | } | 882 | } |
873 | 883 | ||
@@ -951,8 +961,6 @@ static int __init inet6_init(void) | |||
951 | err = -ENOMEM; | 961 | err = -ENOMEM; |
952 | if (raw6_proc_init()) | 962 | if (raw6_proc_init()) |
953 | goto proc_raw6_fail; | 963 | goto proc_raw6_fail; |
954 | if (tcp6_proc_init()) | ||
955 | goto proc_tcp6_fail; | ||
956 | if (udplite6_proc_init()) | 964 | if (udplite6_proc_init()) |
957 | goto proc_udplite6_fail; | 965 | goto proc_udplite6_fail; |
958 | if (ipv6_misc_proc_init()) | 966 | if (ipv6_misc_proc_init()) |
@@ -1037,8 +1045,6 @@ proc_anycast6_fail: | |||
1037 | proc_misc6_fail: | 1045 | proc_misc6_fail: |
1038 | udplite6_proc_exit(); | 1046 | udplite6_proc_exit(); |
1039 | proc_udplite6_fail: | 1047 | proc_udplite6_fail: |
1040 | tcp6_proc_exit(); | ||
1041 | proc_tcp6_fail: | ||
1042 | raw6_proc_exit(); | 1048 | raw6_proc_exit(); |
1043 | proc_raw6_fail: | 1049 | proc_raw6_fail: |
1044 | #endif | 1050 | #endif |
@@ -1098,7 +1104,6 @@ static void __exit inet6_exit(void) | |||
1098 | ac6_proc_exit(); | 1104 | ac6_proc_exit(); |
1099 | ipv6_misc_proc_exit(); | 1105 | ipv6_misc_proc_exit(); |
1100 | udplite6_proc_exit(); | 1106 | udplite6_proc_exit(); |
1101 | tcp6_proc_exit(); | ||
1102 | raw6_proc_exit(); | 1107 | raw6_proc_exit(); |
1103 | #endif | 1108 | #endif |
1104 | ipv6_netfilter_fini(); | 1109 | ipv6_netfilter_fini(); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index caf0cc1c00e1..56d0cea7d578 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -2129,14 +2129,14 @@ static struct tcp_seq_afinfo tcp6_seq_afinfo = { | |||
2129 | .seq_fops = &tcp6_seq_fops, | 2129 | .seq_fops = &tcp6_seq_fops, |
2130 | }; | 2130 | }; |
2131 | 2131 | ||
2132 | int __init tcp6_proc_init(void) | 2132 | int tcp6_proc_init(struct net *net) |
2133 | { | 2133 | { |
2134 | return tcp_proc_register(&tcp6_seq_afinfo); | 2134 | return tcp_proc_register(net, &tcp6_seq_afinfo); |
2135 | } | 2135 | } |
2136 | 2136 | ||
2137 | void tcp6_proc_exit(void) | 2137 | void tcp6_proc_exit(struct net *net) |
2138 | { | 2138 | { |
2139 | tcp_proc_unregister(&tcp6_seq_afinfo); | 2139 | tcp_proc_unregister(net, &tcp6_seq_afinfo); |
2140 | } | 2140 | } |
2141 | #endif | 2141 | #endif |
2142 | 2142 | ||