aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index afe9276d0420..730a861b8f41 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -813,16 +813,12 @@ static int __init init_ipv6_mibs(void)
813 goto err_icmpmsg_mib; 813 goto err_icmpmsg_mib;
814 if (snmp_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib)) < 0) 814 if (snmp_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib)) < 0)
815 goto err_udp_mib; 815 goto err_udp_mib;
816#ifdef CONFIG_IP_UDPLITE
817 if (snmp_mib_init((void **)udplite_stats_in6, 816 if (snmp_mib_init((void **)udplite_stats_in6,
818 sizeof (struct udp_mib)) < 0) 817 sizeof (struct udp_mib)) < 0)
819 goto err_udplite_mib; 818 goto err_udplite_mib;
820#endif
821 return 0; 819 return 0;
822 820
823#ifdef CONFIG_IP_UDPLITE
824err_udplite_mib: 821err_udplite_mib:
825#endif
826 snmp_mib_free((void **)udp_stats_in6); 822 snmp_mib_free((void **)udp_stats_in6);
827err_udp_mib: 823err_udp_mib:
828 snmp_mib_free((void **)icmpv6msg_statistics); 824 snmp_mib_free((void **)icmpv6msg_statistics);
@@ -841,9 +837,7 @@ static void cleanup_ipv6_mibs(void)
841 snmp_mib_free((void **)icmpv6_statistics); 837 snmp_mib_free((void **)icmpv6_statistics);
842 snmp_mib_free((void **)icmpv6msg_statistics); 838 snmp_mib_free((void **)icmpv6msg_statistics);
843 snmp_mib_free((void **)udp_stats_in6); 839 snmp_mib_free((void **)udp_stats_in6);
844#ifdef CONFIG_IP_UDPLITE
845 snmp_mib_free((void **)udplite_stats_in6); 840 snmp_mib_free((void **)udplite_stats_in6);
846#endif
847} 841}
848 842
849static int inet6_net_init(struct net *net) 843static int inet6_net_init(struct net *net)
@@ -888,11 +882,9 @@ static int __init inet6_init(void)
888 if (err) 882 if (err)
889 goto out_unregister_tcp_proto; 883 goto out_unregister_tcp_proto;
890 884
891#ifdef CONFIG_IP_UDPLITE
892 err = proto_register(&udplitev6_prot, 1); 885 err = proto_register(&udplitev6_prot, 1);
893 if (err) 886 if (err)
894 goto out_unregister_udp_proto; 887 goto out_unregister_udp_proto;
895#endif
896 888
897 err = proto_register(&rawv6_prot, 1); 889 err = proto_register(&rawv6_prot, 1);
898 if (err) 890 if (err)
@@ -1063,10 +1055,8 @@ out_sock_register_fail:
1063out_unregister_raw_proto: 1055out_unregister_raw_proto:
1064 proto_unregister(&rawv6_prot); 1056 proto_unregister(&rawv6_prot);
1065out_unregister_udplite_proto: 1057out_unregister_udplite_proto:
1066#ifdef CONFIG_IP_UDPLITE
1067 proto_unregister(&udplitev6_prot); 1058 proto_unregister(&udplitev6_prot);
1068out_unregister_udp_proto: 1059out_unregister_udp_proto:
1069#endif
1070 proto_unregister(&udpv6_prot); 1060 proto_unregister(&udpv6_prot);
1071out_unregister_tcp_proto: 1061out_unregister_tcp_proto:
1072 proto_unregister(&tcpv6_prot); 1062 proto_unregister(&tcpv6_prot);
@@ -1085,9 +1075,7 @@ static void __exit inet6_exit(void)
1085 ipv6_sysctl_unregister(); 1075 ipv6_sysctl_unregister();
1086#endif 1076#endif
1087 udpv6_exit(); 1077 udpv6_exit();
1088#ifdef CONFIG_IP_UDPLITE
1089 udplitev6_exit(); 1078 udplitev6_exit();
1090#endif
1091 tcpv6_exit(); 1079 tcpv6_exit();
1092 1080
1093 /* Cleanup code parts. */ 1081 /* Cleanup code parts. */
@@ -1117,9 +1105,7 @@ static void __exit inet6_exit(void)
1117 unregister_pernet_subsys(&inet6_net_ops); 1105 unregister_pernet_subsys(&inet6_net_ops);
1118 cleanup_ipv6_mibs(); 1106 cleanup_ipv6_mibs();
1119 proto_unregister(&rawv6_prot); 1107 proto_unregister(&rawv6_prot);
1120#ifdef CONFIG_IP_UDPLITE
1121 proto_unregister(&udplitev6_prot); 1108 proto_unregister(&udplitev6_prot);
1122#endif
1123 proto_unregister(&udpv6_prot); 1109 proto_unregister(&udpv6_prot);
1124 proto_unregister(&tcpv6_prot); 1110 proto_unregister(&tcpv6_prot);
1125} 1111}