diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 92bfccf62cb7..1eb1c7f261d4 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <net/ip.h> | 49 | #include <net/ip.h> |
50 | #include <net/ipv6.h> | 50 | #include <net/ipv6.h> |
51 | #include <net/udp.h> | 51 | #include <net/udp.h> |
52 | #include <net/udplite.h> | ||
52 | #include <net/tcp.h> | 53 | #include <net/tcp.h> |
53 | #include <net/ipip.h> | 54 | #include <net/ipip.h> |
54 | #include <net/protocol.h> | 55 | #include <net/protocol.h> |
@@ -737,8 +738,13 @@ static int __init init_ipv6_mibs(void) | |||
737 | if (snmp6_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib), | 738 | if (snmp6_mib_init((void **)udp_stats_in6, sizeof (struct udp_mib), |
738 | __alignof__(struct udp_mib)) < 0) | 739 | __alignof__(struct udp_mib)) < 0) |
739 | goto err_udp_mib; | 740 | goto err_udp_mib; |
741 | if (snmp6_mib_init((void **)udplite_stats_in6, sizeof (struct udp_mib), | ||
742 | __alignof__(struct udp_mib)) < 0) | ||
743 | goto err_udplite_mib; | ||
740 | return 0; | 744 | return 0; |
741 | 745 | ||
746 | err_udplite_mib: | ||
747 | snmp6_mib_free((void **)udp_stats_in6); | ||
742 | err_udp_mib: | 748 | err_udp_mib: |
743 | snmp6_mib_free((void **)icmpv6_statistics); | 749 | snmp6_mib_free((void **)icmpv6_statistics); |
744 | err_icmp_mib: | 750 | err_icmp_mib: |
@@ -753,6 +759,7 @@ static void cleanup_ipv6_mibs(void) | |||
753 | snmp6_mib_free((void **)ipv6_statistics); | 759 | snmp6_mib_free((void **)ipv6_statistics); |
754 | snmp6_mib_free((void **)icmpv6_statistics); | 760 | snmp6_mib_free((void **)icmpv6_statistics); |
755 | snmp6_mib_free((void **)udp_stats_in6); | 761 | snmp6_mib_free((void **)udp_stats_in6); |
762 | snmp6_mib_free((void **)udplite_stats_in6); | ||
756 | } | 763 | } |
757 | 764 | ||
758 | static int __init inet6_init(void) | 765 | static int __init inet6_init(void) |
@@ -780,10 +787,14 @@ static int __init inet6_init(void) | |||
780 | if (err) | 787 | if (err) |
781 | goto out_unregister_tcp_proto; | 788 | goto out_unregister_tcp_proto; |
782 | 789 | ||
783 | err = proto_register(&rawv6_prot, 1); | 790 | err = proto_register(&udplitev6_prot, 1); |
784 | if (err) | 791 | if (err) |
785 | goto out_unregister_udp_proto; | 792 | goto out_unregister_udp_proto; |
786 | 793 | ||
794 | err = proto_register(&rawv6_prot, 1); | ||
795 | if (err) | ||
796 | goto out_unregister_udplite_proto; | ||
797 | |||
787 | 798 | ||
788 | /* Register the socket-side information for inet6_create. */ | 799 | /* Register the socket-side information for inet6_create. */ |
789 | for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) | 800 | for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) |
@@ -837,6 +848,8 @@ static int __init inet6_init(void) | |||
837 | goto proc_tcp6_fail; | 848 | goto proc_tcp6_fail; |
838 | if (udp6_proc_init()) | 849 | if (udp6_proc_init()) |
839 | goto proc_udp6_fail; | 850 | goto proc_udp6_fail; |
851 | if (udplite6_proc_init()) | ||
852 | goto proc_udplite6_fail; | ||
840 | if (ipv6_misc_proc_init()) | 853 | if (ipv6_misc_proc_init()) |
841 | goto proc_misc6_fail; | 854 | goto proc_misc6_fail; |
842 | 855 | ||
@@ -862,6 +875,7 @@ static int __init inet6_init(void) | |||
862 | 875 | ||
863 | /* Init v6 transport protocols. */ | 876 | /* Init v6 transport protocols. */ |
864 | udpv6_init(); | 877 | udpv6_init(); |
878 | udplitev6_init(); | ||
865 | tcpv6_init(); | 879 | tcpv6_init(); |
866 | 880 | ||
867 | ipv6_packet_init(); | 881 | ipv6_packet_init(); |
@@ -879,6 +893,8 @@ proc_if6_fail: | |||
879 | proc_anycast6_fail: | 893 | proc_anycast6_fail: |
880 | ipv6_misc_proc_exit(); | 894 | ipv6_misc_proc_exit(); |
881 | proc_misc6_fail: | 895 | proc_misc6_fail: |
896 | udplite6_proc_exit(); | ||
897 | proc_udplite6_fail: | ||
882 | udp6_proc_exit(); | 898 | udp6_proc_exit(); |
883 | proc_udp6_fail: | 899 | proc_udp6_fail: |
884 | tcp6_proc_exit(); | 900 | tcp6_proc_exit(); |
@@ -902,6 +918,8 @@ out_unregister_sock: | |||
902 | sock_unregister(PF_INET6); | 918 | sock_unregister(PF_INET6); |
903 | out_unregister_raw_proto: | 919 | out_unregister_raw_proto: |
904 | proto_unregister(&rawv6_prot); | 920 | proto_unregister(&rawv6_prot); |
921 | out_unregister_udplite_proto: | ||
922 | proto_unregister(&udplitev6_prot); | ||
905 | out_unregister_udp_proto: | 923 | out_unregister_udp_proto: |
906 | proto_unregister(&udpv6_prot); | 924 | proto_unregister(&udpv6_prot); |
907 | out_unregister_tcp_proto: | 925 | out_unregister_tcp_proto: |
@@ -919,6 +937,7 @@ static void __exit inet6_exit(void) | |||
919 | ac6_proc_exit(); | 937 | ac6_proc_exit(); |
920 | ipv6_misc_proc_exit(); | 938 | ipv6_misc_proc_exit(); |
921 | udp6_proc_exit(); | 939 | udp6_proc_exit(); |
940 | udplite6_proc_exit(); | ||
922 | tcp6_proc_exit(); | 941 | tcp6_proc_exit(); |
923 | raw6_proc_exit(); | 942 | raw6_proc_exit(); |
924 | #endif | 943 | #endif |