aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-14 01:29:13 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 01:29:13 -0400
commit72a2d6138224298a576bcdc33d7d0004de604856 (patch)
treef2bebe6490dd58214140046945d55c8519aa44e0 /net/dccp
parent67019cc9ee3f4868c8e5e493b2873c4722306019 (diff)
[NETNS][DCCPV4]: 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')
-rw-r--r--net/dccp/ipv4.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index b12803bcba56..10bba039c4b8 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -989,6 +989,20 @@ static struct inet_protosw dccp_v4_protosw = {
989 .flags = INET_PROTOSW_ICSK, 989 .flags = INET_PROTOSW_ICSK,
990}; 990};
991 991
992static int dccp_v4_init_net(struct net *net)
993{
994 return 0;
995}
996
997static void dccp_v4_exit_net(struct net *net)
998{
999}
1000
1001static struct pernet_operations dccp_v4_ops = {
1002 .init = dccp_v4_init_net,
1003 .exit = dccp_v4_exit_net,
1004};
1005
992static int __init dccp_v4_init(void) 1006static int __init dccp_v4_init(void)
993{ 1007{
994 int err = proto_register(&dccp_v4_prot, 1); 1008 int err = proto_register(&dccp_v4_prot, 1);
@@ -1006,8 +1020,14 @@ static int __init dccp_v4_init(void)
1006 SOCK_DCCP, IPPROTO_DCCP, &init_net); 1020 SOCK_DCCP, IPPROTO_DCCP, &init_net);
1007 if (err) 1021 if (err)
1008 goto out_unregister_protosw; 1022 goto out_unregister_protosw;
1023
1024 err = register_pernet_subsys(&dccp_v4_ops);
1025 if (err)
1026 goto out_destroy_ctl_sock;
1009out: 1027out:
1010 return err; 1028 return err;
1029out_destroy_ctl_sock:
1030 inet_ctl_sock_destroy(dccp_v4_ctl_sk);
1011out_unregister_protosw: 1031out_unregister_protosw:
1012 inet_unregister_protosw(&dccp_v4_protosw); 1032 inet_unregister_protosw(&dccp_v4_protosw);
1013 inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP); 1033 inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
@@ -1018,6 +1038,7 @@ out_proto_unregister:
1018 1038
1019static void __exit dccp_v4_exit(void) 1039static void __exit dccp_v4_exit(void)
1020{ 1040{
1041 unregister_pernet_subsys(&dccp_v4_ops);
1021 inet_ctl_sock_destroy(dccp_v4_ctl_sk); 1042 inet_ctl_sock_destroy(dccp_v4_ctl_sk);
1022 inet_unregister_protosw(&dccp_v4_protosw); 1043 inet_unregister_protosw(&dccp_v4_protosw);
1023 inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP); 1044 inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);