From 8464d69070dbc9df1156348beef2a7f411d55bc2 Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Thu, 13 Dec 2007 12:02:43 -0200 Subject: [PATCH] --- yaml --- r: 78439 b: refs/heads/master c: 92d31920b84f258badf206eea8aaf5ac677ac535 h: refs/heads/master i: 78437: a295aa185a91198df8d86d440e25f0ae33322f5d 78435: eb2c6a0f1bed684e9fd7a29e0e112c4bbb5b2117 78431: 01629d201c4044a4f9926b3b82330bdeadb9ee40 v: v3 --- [refs] | 2 +- trunk/net/dccp/output.c | 13 ++++++++++++- trunk/net/dccp/proto.c | 18 ------------------ 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 6cbbb3d9dce3..1c6142860349 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09f7709f4929666006931f1d4efc498a6d419bbc +refs/heads/master: 92d31920b84f258badf206eea8aaf5ac677ac535 diff --git a/trunk/net/dccp/output.c b/trunk/net/dccp/output.c index 7caa7f57bb7e..e97584aa4898 100644 --- a/trunk/net/dccp/output.c +++ b/trunk/net/dccp/output.c @@ -574,7 +574,18 @@ void dccp_send_close(struct sock *sk, const int active) dccp_write_xmit(sk, 1); dccp_skb_entail(sk, skb); dccp_transmit_skb(sk, skb_clone(skb, prio)); - /* FIXME do we need a retransmit timer here? */ + /* + * Retransmission timer for active-close: RFC 4340, 8.3 requires + * to retransmit the Close/CloseReq until the CLOSING/CLOSEREQ + * state can be left. The initial timeout is 2 RTTs. + * Since RTT measurement is done by the CCIDs, there is no easy + * way to get an RTT sample. The fallback RTT from RFC 4340, 3.4 + * is too low (200ms); we use a high value to avoid unnecessary + * retransmissions when the link RTT is > 0.2 seconds. + * FIXME: Let main module sample RTTs and use that instead. + */ + inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, + DCCP_TIMEOUT_INIT, DCCP_RTO_MAX); } else dccp_transmit_skb(sk, skb); } diff --git a/trunk/net/dccp/proto.c b/trunk/net/dccp/proto.c index 60f40ec72ff3..8a73c8f98d76 100644 --- a/trunk/net/dccp/proto.c +++ b/trunk/net/dccp/proto.c @@ -996,24 +996,6 @@ void dccp_close(struct sock *sk, long timeout) if (state != DCCP_CLOSED && sk->sk_state == DCCP_CLOSED) goto out; - /* - * The last release_sock may have processed the CLOSE or RESET - * packet moving sock to CLOSED state, if not we have to fire - * the CLOSE/CLOSEREQ retransmission timer, see "8.3. Termination" - * in draft-ietf-dccp-spec-11. -acme - */ - if (sk->sk_state == DCCP_CLOSING) { - /* FIXME: should start at 2 * RTT */ - /* Timer for repeating the CLOSE/CLOSEREQ until an answer. */ - inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, - inet_csk(sk)->icsk_rto, - DCCP_RTO_MAX); -#if 0 - /* Yeah, we should use sk->sk_prot->orphan_count, etc */ - dccp_set_state(sk, DCCP_CLOSED); -#endif - } - if (sk->sk_state == DCCP_CLOSED) inet_csk_destroy_sock(sk);