diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/output.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index aadbdb58758b..6993a9338cf7 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -474,8 +474,9 @@ int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code) | |||
474 | /* | 474 | /* |
475 | * Do all connect socket setups that can be done AF independent. | 475 | * Do all connect socket setups that can be done AF independent. |
476 | */ | 476 | */ |
477 | static inline void dccp_connect_init(struct sock *sk) | 477 | int dccp_connect(struct sock *sk) |
478 | { | 478 | { |
479 | struct sk_buff *skb; | ||
479 | struct dccp_sock *dp = dccp_sk(sk); | 480 | struct dccp_sock *dp = dccp_sk(sk); |
480 | struct dst_entry *dst = __sk_dst_get(sk); | 481 | struct dst_entry *dst = __sk_dst_get(sk); |
481 | struct inet_connection_sock *icsk = inet_csk(sk); | 482 | struct inet_connection_sock *icsk = inet_csk(sk); |
@@ -485,22 +486,12 @@ static inline void dccp_connect_init(struct sock *sk) | |||
485 | 486 | ||
486 | dccp_sync_mss(sk, dst_mtu(dst)); | 487 | dccp_sync_mss(sk, dst_mtu(dst)); |
487 | 488 | ||
488 | /* Initialise GAR as per 8.5; AWL/AWH are set in dccp_transmit_skb() */ | ||
489 | dp->dccps_gar = dp->dccps_iss; | ||
490 | |||
491 | icsk->icsk_retransmits = 0; | ||
492 | } | ||
493 | |||
494 | int dccp_connect(struct sock *sk) | ||
495 | { | ||
496 | struct sk_buff *skb; | ||
497 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
498 | |||
499 | /* do not connect if feature negotiation setup fails */ | 489 | /* do not connect if feature negotiation setup fails */ |
500 | if (dccp_feat_finalise_settings(dccp_sk(sk))) | 490 | if (dccp_feat_finalise_settings(dccp_sk(sk))) |
501 | return -EPROTO; | 491 | return -EPROTO; |
502 | 492 | ||
503 | dccp_connect_init(sk); | 493 | /* Initialise GAR as per 8.5; AWL/AWH are set in dccp_transmit_skb() */ |
494 | dp->dccps_gar = dp->dccps_iss; | ||
504 | 495 | ||
505 | skb = alloc_skb(sk->sk_prot->max_header, sk->sk_allocation); | 496 | skb = alloc_skb(sk->sk_prot->max_header, sk->sk_allocation); |
506 | if (unlikely(skb == NULL)) | 497 | if (unlikely(skb == NULL)) |
@@ -516,6 +507,7 @@ int dccp_connect(struct sock *sk) | |||
516 | DCCP_INC_STATS(DCCP_MIB_ACTIVEOPENS); | 507 | DCCP_INC_STATS(DCCP_MIB_ACTIVEOPENS); |
517 | 508 | ||
518 | /* Timer for repeating the REQUEST until an answer. */ | 509 | /* Timer for repeating the REQUEST until an answer. */ |
510 | icsk->icsk_retransmits = 0; | ||
519 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, | 511 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, |
520 | icsk->icsk_rto, DCCP_RTO_MAX); | 512 | icsk->icsk_rto, DCCP_RTO_MAX); |
521 | return 0; | 513 | return 0; |