diff options
Diffstat (limited to 'net/dccp/ipv6.c')
| -rw-r--r-- | net/dccp/ipv6.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 3c9f0836404f..6bd9979334a2 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
| @@ -1229,29 +1229,6 @@ static struct inet_protosw dccp_v6_protosw = { | |||
| 1229 | .flags = INET_PROTOSW_ICSK, | 1229 | .flags = INET_PROTOSW_ICSK, |
| 1230 | }; | 1230 | }; |
| 1231 | 1231 | ||
| 1232 | static char dccp_v6_ctl_socket_err_msg[] __initdata = | ||
| 1233 | KERN_ERR "DCCP: Failed to create the control socket.\n"; | ||
| 1234 | |||
| 1235 | static int __init dccp_v6_ctl_sock_init(void) | ||
| 1236 | { | ||
| 1237 | int rc = sock_create_kern(PF_INET6, SOCK_DCCP, IPPROTO_DCCP, | ||
| 1238 | &dccp_v6_ctl_socket); | ||
| 1239 | if (rc < 0) | ||
| 1240 | printk(dccp_v6_ctl_socket_err_msg); | ||
| 1241 | else { | ||
| 1242 | dccp_v6_ctl_socket->sk->sk_allocation = GFP_ATOMIC; | ||
| 1243 | inet_sk(dccp_v6_ctl_socket->sk)->uc_ttl = -1; | ||
| 1244 | |||
| 1245 | /* Unhash it so that IP input processing does not even | ||
| 1246 | * see it, we do not wish this socket to see incoming | ||
| 1247 | * packets. | ||
| 1248 | */ | ||
| 1249 | dccp_v6_ctl_socket->sk->sk_prot->unhash(dccp_v6_ctl_socket->sk); | ||
| 1250 | } | ||
| 1251 | |||
| 1252 | return rc; | ||
| 1253 | } | ||
| 1254 | |||
| 1255 | static int __init dccp_v6_init(void) | 1232 | static int __init dccp_v6_init(void) |
| 1256 | { | 1233 | { |
| 1257 | int err = proto_register(&dccp_v6_prot, 1); | 1234 | int err = proto_register(&dccp_v6_prot, 1); |
| @@ -1265,7 +1242,9 @@ static int __init dccp_v6_init(void) | |||
| 1265 | 1242 | ||
| 1266 | inet6_register_protosw(&dccp_v6_protosw); | 1243 | inet6_register_protosw(&dccp_v6_protosw); |
| 1267 | 1244 | ||
| 1268 | if (dccp_v6_ctl_sock_init() != 0) | 1245 | err = inet_csk_ctl_sock_create(&dccp_v6_ctl_socket, PF_INET6, |
| 1246 | SOCK_DCCP, IPPROTO_DCCP); | ||
| 1247 | if (err != 0) | ||
| 1269 | goto out_unregister_protosw; | 1248 | goto out_unregister_protosw; |
| 1270 | out: | 1249 | out: |
| 1271 | return err; | 1250 | return err; |
