X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fdccp%2Ftimer.c;h=8447742f5615c6b615ee40ae086f5d4a1e6052d6;hb=1143e5a6d4d69cd36d44e0184769aa2b17041a10;hp=aa34b576e22827b038ab11a6a6e750def8786c0c;hpb=3cb904caa97f5c193df21b8cdf780a826564baff;p=powerpc.git diff --git a/net/dccp/timer.c b/net/dccp/timer.c index aa34b576e2..8447742f56 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c @@ -10,7 +10,6 @@ * 2 of the License, or (at your option) any later version. */ -#include #include #include @@ -31,7 +30,7 @@ static void dccp_write_err(struct sock *sk) sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; sk->sk_error_report(sk); - dccp_v4_send_reset(sk, DCCP_RESET_CODE_ABORTED); + dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); dccp_done(sk); DCCP_INC_STATS_BH(DCCP_MIB_ABORTONTIMEOUT); } @@ -141,6 +140,17 @@ static void dccp_retransmit_timer(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); + /* retransmit timer is used for feature negotiation throughout + * connection. In this case, no packet is re-transmitted, but rather an + * ack is generated and pending changes are splaced into its options. + */ + if (sk->sk_send_head == NULL) { + dccp_pr_debug("feat negotiation retransmit timeout %p\n", sk); + if (sk->sk_state == DCCP_OPEN) + dccp_send_ack(sk); + goto backoff; + } + /* * sk->sk_send_head has to have one skb with * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP @@ -177,6 +187,7 @@ static void dccp_retransmit_timer(struct sock *sk) goto out; } +backoff: icsk->icsk_backoff++; icsk->icsk_retransmits++;