diff options
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 962df0ea31aa..72cbdcfc2c65 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -217,7 +217,7 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
217 | icsk->icsk_sync_mss = dccp_sync_mss; | 217 | icsk->icsk_sync_mss = dccp_sync_mss; |
218 | dp->dccps_mss_cache = 536; | 218 | dp->dccps_mss_cache = 536; |
219 | dp->dccps_role = DCCP_ROLE_UNDEFINED; | 219 | dp->dccps_role = DCCP_ROLE_UNDEFINED; |
220 | dp->dccps_service = DCCP_SERVICE_INVALID_VALUE; | 220 | dp->dccps_service = DCCP_SERVICE_CODE_IS_ABSENT; |
221 | dp->dccps_l_ack_ratio = dp->dccps_r_ack_ratio = 1; | 221 | dp->dccps_l_ack_ratio = dp->dccps_r_ack_ratio = 1; |
222 | 222 | ||
223 | return 0; | 223 | return 0; |
@@ -267,12 +267,6 @@ static inline int dccp_listen_start(struct sock *sk) | |||
267 | struct dccp_sock *dp = dccp_sk(sk); | 267 | struct dccp_sock *dp = dccp_sk(sk); |
268 | 268 | ||
269 | dp->dccps_role = DCCP_ROLE_LISTEN; | 269 | dp->dccps_role = DCCP_ROLE_LISTEN; |
270 | /* | ||
271 | * Apps need to use setsockopt(DCCP_SOCKOPT_SERVICE) | ||
272 | * before calling listen() | ||
273 | */ | ||
274 | if (dccp_service_not_initialized(sk)) | ||
275 | return -EPROTO; | ||
276 | return inet_csk_listen_start(sk, TCP_SYNQ_HSIZE); | 270 | return inet_csk_listen_start(sk, TCP_SYNQ_HSIZE); |
277 | } | 271 | } |
278 | 272 | ||
@@ -540,9 +534,6 @@ static int dccp_getsockopt_service(struct sock *sk, int len, | |||
540 | int err = -ENOENT, slen = 0, total_len = sizeof(u32); | 534 | int err = -ENOENT, slen = 0, total_len = sizeof(u32); |
541 | 535 | ||
542 | lock_sock(sk); | 536 | lock_sock(sk); |
543 | if (dccp_service_not_initialized(sk)) | ||
544 | goto out; | ||
545 | |||
546 | if ((sl = dp->dccps_service_list) != NULL) { | 537 | if ((sl = dp->dccps_service_list) != NULL) { |
547 | slen = sl->dccpsl_nr * sizeof(u32); | 538 | slen = sl->dccpsl_nr * sizeof(u32); |
548 | total_len += slen; | 539 | total_len += slen; |