diff options
Diffstat (limited to 'net/dccp/timer.c')
-rw-r--r-- | net/dccp/timer.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/dccp/timer.c b/net/dccp/timer.c index aa34b576e228..5244415e5f18 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c | |||
@@ -31,7 +31,7 @@ static void dccp_write_err(struct sock *sk) | |||
31 | sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; | 31 | sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; |
32 | sk->sk_error_report(sk); | 32 | sk->sk_error_report(sk); |
33 | 33 | ||
34 | dccp_v4_send_reset(sk, DCCP_RESET_CODE_ABORTED); | 34 | dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); |
35 | dccp_done(sk); | 35 | dccp_done(sk); |
36 | DCCP_INC_STATS_BH(DCCP_MIB_ABORTONTIMEOUT); | 36 | DCCP_INC_STATS_BH(DCCP_MIB_ABORTONTIMEOUT); |
37 | } | 37 | } |
@@ -141,6 +141,17 @@ static void dccp_retransmit_timer(struct sock *sk) | |||
141 | { | 141 | { |
142 | struct inet_connection_sock *icsk = inet_csk(sk); | 142 | struct inet_connection_sock *icsk = inet_csk(sk); |
143 | 143 | ||
144 | /* retransmit timer is used for feature negotiation throughout | ||
145 | * connection. In this case, no packet is re-transmitted, but rather an | ||
146 | * ack is generated and pending changes are splaced into its options. | ||
147 | */ | ||
148 | if (sk->sk_send_head == NULL) { | ||
149 | dccp_pr_debug("feat negotiation retransmit timeout %p\n", sk); | ||
150 | if (sk->sk_state == DCCP_OPEN) | ||
151 | dccp_send_ack(sk); | ||
152 | goto backoff; | ||
153 | } | ||
154 | |||
144 | /* | 155 | /* |
145 | * sk->sk_send_head has to have one skb with | 156 | * sk->sk_send_head has to have one skb with |
146 | * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP | 157 | * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP |
@@ -177,6 +188,7 @@ static void dccp_retransmit_timer(struct sock *sk) | |||
177 | goto out; | 188 | goto out; |
178 | } | 189 | } |
179 | 190 | ||
191 | backoff: | ||
180 | icsk->icsk_backoff++; | 192 | icsk->icsk_backoff++; |
181 | icsk->icsk_retransmits++; | 193 | icsk->icsk_retransmits++; |
182 | 194 | ||