aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-12-09 21:06:01 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-11 17:34:50 -0500
commitfe0499ae95f5f636bda1f6e0bdba5b7b023ea827 (patch)
treed944ebcdaa0b689de58e3c98adf3d3b707385493 /net/dccp
parent65d6c2b42ecc0ca77bb3c0fe27fcbdc84fc7a79a (diff)
[DCCP] ccid3: Initialise RTT values
In both the sender and the receiver it is possible that the stored RTT value is accessed before an actual RTT estimate has been computed. This patch * initialises the sender RTT to 0 - the sender always accesses the RTT in ccid3_hc_tx_packet_sent - the RTT is further needed for the window counter algorithm * replaces the receiver initialisation of 5msec with 0 - which has the same effect and removes an `XXX' - the RTT value is needed in ccid3_hc_rx_packet_recv as rtt_prev Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ccids/ccid3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 7017d84a381d..7618d51aa2d2 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -617,6 +617,7 @@ static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk)
617 struct ccid3_hc_tx_sock *hctx = ccid_priv(ccid); 617 struct ccid3_hc_tx_sock *hctx = ccid_priv(ccid);
618 618
619 hctx->ccid3hctx_s = 0; 619 hctx->ccid3hctx_s = 0;
620 hctx->ccid3hctx_rtt = 0;
620 hctx->ccid3hctx_state = TFRC_SSTATE_NO_SENT; 621 hctx->ccid3hctx_state = TFRC_SSTATE_NO_SENT;
621 INIT_LIST_HEAD(&hctx->ccid3hctx_hist); 622 INIT_LIST_HEAD(&hctx->ccid3hctx_hist);
622 623
@@ -1093,7 +1094,7 @@ static int ccid3_hc_rx_init(struct ccid *ccid, struct sock *sk)
1093 dccp_timestamp(sk, &hcrx->ccid3hcrx_tstamp_last_ack); 1094 dccp_timestamp(sk, &hcrx->ccid3hcrx_tstamp_last_ack);
1094 hcrx->ccid3hcrx_tstamp_last_feedback = hcrx->ccid3hcrx_tstamp_last_ack; 1095 hcrx->ccid3hcrx_tstamp_last_feedback = hcrx->ccid3hcrx_tstamp_last_ack;
1095 hcrx->ccid3hcrx_s = 0; 1096 hcrx->ccid3hcrx_s = 0;
1096 hcrx->ccid3hcrx_rtt = 5000; /* XXX 5ms for now... */ 1097 hcrx->ccid3hcrx_rtt = 0;
1097 return 0; 1098 return 0;
1098} 1099}
1099 1100