diff options
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r-- | net/sctp/ipv6.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 9aa0733aee87..b1e05d719f9b 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -1014,15 +1014,24 @@ static struct sctp_pf sctp_pf_inet6 = { | |||
1014 | }; | 1014 | }; |
1015 | 1015 | ||
1016 | /* Initialize IPv6 support and register with socket layer. */ | 1016 | /* Initialize IPv6 support and register with socket layer. */ |
1017 | int sctp_v6_init(void) | 1017 | void sctp_v6_pf_init(void) |
1018 | { | 1018 | { |
1019 | int rc; | ||
1020 | |||
1021 | /* Register the SCTP specific PF_INET6 functions. */ | 1019 | /* Register the SCTP specific PF_INET6 functions. */ |
1022 | sctp_register_pf(&sctp_pf_inet6, PF_INET6); | 1020 | sctp_register_pf(&sctp_pf_inet6, PF_INET6); |
1023 | 1021 | ||
1024 | /* Register the SCTP specific AF_INET6 functions. */ | 1022 | /* Register the SCTP specific AF_INET6 functions. */ |
1025 | sctp_register_af(&sctp_af_inet6); | 1023 | sctp_register_af(&sctp_af_inet6); |
1024 | } | ||
1025 | |||
1026 | void sctp_v6_pf_exit(void) | ||
1027 | { | ||
1028 | list_del(&sctp_af_inet6.list); | ||
1029 | } | ||
1030 | |||
1031 | /* Initialize IPv6 support and register with socket layer. */ | ||
1032 | int sctp_v6_protosw_init(void) | ||
1033 | { | ||
1034 | int rc; | ||
1026 | 1035 | ||
1027 | rc = proto_register(&sctpv6_prot, 1); | 1036 | rc = proto_register(&sctpv6_prot, 1); |
1028 | if (rc) | 1037 | if (rc) |
@@ -1035,6 +1044,14 @@ int sctp_v6_init(void) | |||
1035 | return 0; | 1044 | return 0; |
1036 | } | 1045 | } |
1037 | 1046 | ||
1047 | void sctp_v6_protosw_exit(void) | ||
1048 | { | ||
1049 | inet6_unregister_protosw(&sctpv6_seqpacket_protosw); | ||
1050 | inet6_unregister_protosw(&sctpv6_stream_protosw); | ||
1051 | proto_unregister(&sctpv6_prot); | ||
1052 | } | ||
1053 | |||
1054 | |||
1038 | /* Register with inet6 layer. */ | 1055 | /* Register with inet6 layer. */ |
1039 | int sctp_v6_add_protocol(void) | 1056 | int sctp_v6_add_protocol(void) |
1040 | { | 1057 | { |
@@ -1047,15 +1064,6 @@ int sctp_v6_add_protocol(void) | |||
1047 | return 0; | 1064 | return 0; |
1048 | } | 1065 | } |
1049 | 1066 | ||
1050 | /* IPv6 specific exit support. */ | ||
1051 | void sctp_v6_exit(void) | ||
1052 | { | ||
1053 | inet6_unregister_protosw(&sctpv6_seqpacket_protosw); | ||
1054 | inet6_unregister_protosw(&sctpv6_stream_protosw); | ||
1055 | proto_unregister(&sctpv6_prot); | ||
1056 | list_del(&sctp_af_inet6.list); | ||
1057 | } | ||
1058 | |||
1059 | /* Unregister with inet6 layer. */ | 1067 | /* Unregister with inet6 layer. */ |
1060 | void sctp_v6_del_protocol(void) | 1068 | void sctp_v6_del_protocol(void) |
1061 | { | 1069 | { |