Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90656
b: refs/heads/master
c: 72a2d61
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 14, 2008
1 parent ca2d980 commit 5905033
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67019cc9ee3f4868c8e5e493b2873c4722306019
refs/heads/master: 72a2d6138224298a576bcdc33d7d0004de604856
21 changes: 21 additions & 0 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,20 @@ static struct inet_protosw dccp_v4_protosw = {
.flags = INET_PROTOSW_ICSK,
};

static int dccp_v4_init_net(struct net *net)
{
return 0;
}

static void dccp_v4_exit_net(struct net *net)
{
}

static struct pernet_operations dccp_v4_ops = {
.init = dccp_v4_init_net,
.exit = dccp_v4_exit_net,
};

static int __init dccp_v4_init(void)
{
int err = proto_register(&dccp_v4_prot, 1);
Expand All @@ -1006,8 +1020,14 @@ static int __init dccp_v4_init(void)
SOCK_DCCP, IPPROTO_DCCP, &init_net);
if (err)
goto out_unregister_protosw;

err = register_pernet_subsys(&dccp_v4_ops);
if (err)
goto out_destroy_ctl_sock;
out:
return err;
out_destroy_ctl_sock:
inet_ctl_sock_destroy(dccp_v4_ctl_sk);
out_unregister_protosw:
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
Expand All @@ -1018,6 +1038,7 @@ static int __init dccp_v4_init(void)

static void __exit dccp_v4_exit(void)
{
unregister_pernet_subsys(&dccp_v4_ops);
inet_ctl_sock_destroy(dccp_v4_ctl_sk);
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP);
Expand Down

0 comments on commit 5905033

Please sign in to comment.