diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-14 01:32:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 01:32:02 -0400 |
commit | 8231bd270df435f2d4d85b284dd9dbd48521dd84 (patch) | |
tree | 910c5d067af572ae28809df7ed7501b10c399d57 /net/dccp/ipv6.c | |
parent | 68d185980f70413b353df99cdf5e667510036668 (diff) |
[NETNS][DCCPV6]: Add dummy per-net operations.
They will be responsible for ctl socket initialization, but
currently they are void.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index b657dea9ee27..2ca52913f4be 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -1171,6 +1171,20 @@ static struct inet_protosw dccp_v6_protosw = { | |||
1171 | .flags = INET_PROTOSW_ICSK, | 1171 | .flags = INET_PROTOSW_ICSK, |
1172 | }; | 1172 | }; |
1173 | 1173 | ||
1174 | static int dccp_v6_init_net(struct net *net) | ||
1175 | { | ||
1176 | return 0; | ||
1177 | } | ||
1178 | |||
1179 | static void dccp_v6_exit_net(struct net *net) | ||
1180 | { | ||
1181 | } | ||
1182 | |||
1183 | static struct pernet_operations dccp_v6_ops = { | ||
1184 | .init = dccp_v6_init_net, | ||
1185 | .exit = dccp_v6_exit_net, | ||
1186 | }; | ||
1187 | |||
1174 | static int __init dccp_v6_init(void) | 1188 | static int __init dccp_v6_init(void) |
1175 | { | 1189 | { |
1176 | int err = proto_register(&dccp_v6_prot, 1); | 1190 | int err = proto_register(&dccp_v6_prot, 1); |
@@ -1188,8 +1202,15 @@ static int __init dccp_v6_init(void) | |||
1188 | SOCK_DCCP, IPPROTO_DCCP, &init_net); | 1202 | SOCK_DCCP, IPPROTO_DCCP, &init_net); |
1189 | if (err != 0) | 1203 | if (err != 0) |
1190 | goto out_unregister_protosw; | 1204 | goto out_unregister_protosw; |
1205 | |||
1206 | err = register_pernet_subsys(&dccp_v6_ops); | ||
1207 | if (err != 0) | ||
1208 | goto out_destroy_ctl_sock; | ||
1191 | out: | 1209 | out: |
1192 | return err; | 1210 | return err; |
1211 | |||
1212 | out_destroy_ctl_sock: | ||
1213 | inet_ctl_sock_destroy(dccp_v6_ctl_sk); | ||
1193 | out_unregister_protosw: | 1214 | out_unregister_protosw: |
1194 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); | 1215 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); |
1195 | inet6_unregister_protosw(&dccp_v6_protosw); | 1216 | inet6_unregister_protosw(&dccp_v6_protosw); |
@@ -1200,6 +1221,7 @@ out_unregister_proto: | |||
1200 | 1221 | ||
1201 | static void __exit dccp_v6_exit(void) | 1222 | static void __exit dccp_v6_exit(void) |
1202 | { | 1223 | { |
1224 | unregister_pernet_subsys(&dccp_v6_ops); | ||
1203 | inet_ctl_sock_destroy(dccp_v6_ctl_sk); | 1225 | inet_ctl_sock_destroy(dccp_v6_ctl_sk); |
1204 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); | 1226 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); |
1205 | inet6_unregister_protosw(&dccp_v6_protosw); | 1227 | inet6_unregister_protosw(&dccp_v6_protosw); |