diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 730a861b8f41..e3e09147d134 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -842,6 +842,8 @@ static void cleanup_ipv6_mibs(void) | |||
842 | 842 | ||
843 | static int inet6_net_init(struct net *net) | 843 | static int inet6_net_init(struct net *net) |
844 | { | 844 | { |
845 | int err = 0; | ||
846 | |||
845 | net->ipv6.sysctl.bindv6only = 0; | 847 | net->ipv6.sysctl.bindv6only = 0; |
846 | net->ipv6.sysctl.flush_delay = 0; | 848 | net->ipv6.sysctl.flush_delay = 0; |
847 | net->ipv6.sysctl.ip6_rt_max_size = 4096; | 849 | net->ipv6.sysctl.ip6_rt_max_size = 4096; |
@@ -853,12 +855,20 @@ static int inet6_net_init(struct net *net) | |||
853 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; | 855 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; |
854 | net->ipv6.sysctl.icmpv6_time = 1*HZ; | 856 | net->ipv6.sysctl.icmpv6_time = 1*HZ; |
855 | 857 | ||
856 | return 0; | 858 | #ifdef CONFIG_PROC_FS |
859 | err = udp6_proc_init(net); | ||
860 | if (err) | ||
861 | goto out; | ||
862 | out: | ||
863 | #endif | ||
864 | return err; | ||
857 | } | 865 | } |
858 | 866 | ||
859 | static void inet6_net_exit(struct net *net) | 867 | static void inet6_net_exit(struct net *net) |
860 | { | 868 | { |
861 | return; | 869 | #ifdef CONFIG_PROC_FS |
870 | udp6_proc_exit(net); | ||
871 | #endif | ||
862 | } | 872 | } |
863 | 873 | ||
864 | static struct pernet_operations inet6_net_ops = { | 874 | static struct pernet_operations inet6_net_ops = { |
@@ -943,8 +953,6 @@ static int __init inet6_init(void) | |||
943 | goto proc_raw6_fail; | 953 | goto proc_raw6_fail; |
944 | if (tcp6_proc_init()) | 954 | if (tcp6_proc_init()) |
945 | goto proc_tcp6_fail; | 955 | goto proc_tcp6_fail; |
946 | if (udp6_proc_init()) | ||
947 | goto proc_udp6_fail; | ||
948 | if (udplite6_proc_init()) | 956 | if (udplite6_proc_init()) |
949 | goto proc_udplite6_fail; | 957 | goto proc_udplite6_fail; |
950 | if (ipv6_misc_proc_init()) | 958 | if (ipv6_misc_proc_init()) |
@@ -1029,8 +1037,6 @@ proc_anycast6_fail: | |||
1029 | proc_misc6_fail: | 1037 | proc_misc6_fail: |
1030 | udplite6_proc_exit(); | 1038 | udplite6_proc_exit(); |
1031 | proc_udplite6_fail: | 1039 | proc_udplite6_fail: |
1032 | udp6_proc_exit(); | ||
1033 | proc_udp6_fail: | ||
1034 | tcp6_proc_exit(); | 1040 | tcp6_proc_exit(); |
1035 | proc_tcp6_fail: | 1041 | proc_tcp6_fail: |
1036 | raw6_proc_exit(); | 1042 | raw6_proc_exit(); |
@@ -1092,7 +1098,6 @@ static void __exit inet6_exit(void) | |||
1092 | ac6_proc_exit(); | 1098 | ac6_proc_exit(); |
1093 | ipv6_misc_proc_exit(); | 1099 | ipv6_misc_proc_exit(); |
1094 | udplite6_proc_exit(); | 1100 | udplite6_proc_exit(); |
1095 | udp6_proc_exit(); | ||
1096 | tcp6_proc_exit(); | 1101 | tcp6_proc_exit(); |
1097 | raw6_proc_exit(); | 1102 | raw6_proc_exit(); |
1098 | #endif | 1103 | #endif |