diff options
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 39056dc61355..b1eaf7bcfb11 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -26,11 +26,13 @@ static inline void dccp_event_ack_sent(struct sock *sk) | |||
26 | inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK); | 26 | inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK); |
27 | } | 27 | } |
28 | 28 | ||
29 | static void dccp_skb_entail(struct sock *sk, struct sk_buff *skb) | 29 | /* enqueue @skb on sk_send_head for retransmission, return clone to send now */ |
30 | static struct sk_buff *dccp_skb_entail(struct sock *sk, struct sk_buff *skb) | ||
30 | { | 31 | { |
31 | skb_set_owner_w(skb, sk); | 32 | skb_set_owner_w(skb, sk); |
32 | WARN_ON(sk->sk_send_head); | 33 | WARN_ON(sk->sk_send_head); |
33 | sk->sk_send_head = skb; | 34 | sk->sk_send_head = skb; |
35 | return skb_clone(sk->sk_send_head, gfp_any()); | ||
34 | } | 36 | } |
35 | 37 | ||
36 | /* | 38 | /* |
@@ -550,8 +552,7 @@ int dccp_connect(struct sock *sk) | |||
550 | 552 | ||
551 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_REQUEST; | 553 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_REQUEST; |
552 | 554 | ||
553 | dccp_skb_entail(sk, skb); | 555 | dccp_transmit_skb(sk, dccp_skb_entail(sk, skb)); |
554 | dccp_transmit_skb(sk, skb_clone(skb, GFP_KERNEL)); | ||
555 | DCCP_INC_STATS(DCCP_MIB_ACTIVEOPENS); | 556 | DCCP_INC_STATS(DCCP_MIB_ACTIVEOPENS); |
556 | 557 | ||
557 | /* Timer for repeating the REQUEST until an answer. */ | 558 | /* Timer for repeating the REQUEST until an answer. */ |
@@ -676,8 +677,7 @@ void dccp_send_close(struct sock *sk, const int active) | |||
676 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSE; | 677 | DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSE; |
677 | 678 | ||
678 | if (active) { | 679 | if (active) { |
679 | dccp_skb_entail(sk, skb); | 680 | skb = dccp_skb_entail(sk, skb); |
680 | dccp_transmit_skb(sk, skb_clone(skb, prio)); | ||
681 | /* | 681 | /* |
682 | * Retransmission timer for active-close: RFC 4340, 8.3 requires | 682 | * Retransmission timer for active-close: RFC 4340, 8.3 requires |
683 | * to retransmit the Close/CloseReq until the CLOSING/CLOSEREQ | 683 | * to retransmit the Close/CloseReq until the CLOSING/CLOSEREQ |
@@ -690,6 +690,6 @@ void dccp_send_close(struct sock *sk, const int active) | |||
690 | */ | 690 | */ |
691 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, | 691 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, |
692 | DCCP_TIMEOUT_INIT, DCCP_RTO_MAX); | 692 | DCCP_TIMEOUT_INIT, DCCP_RTO_MAX); |
693 | } else | 693 | } |
694 | dccp_transmit_skb(sk, skb); | 694 | dccp_transmit_skb(sk, skb); |
695 | } | 695 | } |