summaryrefslogtreecommitdiffstats
path: root/net/dccp/input.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2007-03-20 15:27:17 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:02 -0700
commit89560b53b92a07c529e13a462aa7fd87a844f1f5 (patch)
tree89409bee68da1ee44b7945315efecd779d7fe60a /net/dccp/input.c
parent7dfee1a9c07f80a82aa5fbad340146f2b5c794b4 (diff)
downloadlinux-stable-89560b53b92a07c529e13a462aa7fd87a844f1f5.tar.gz
linux-stable-89560b53b92a07c529e13a462aa7fd87a844f1f5.tar.bz2
linux-stable-89560b53b92a07c529e13a462aa7fd87a844f1f5.zip
[DCCP]: Sample RTT from SYN exchange
Function:
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r--net/dccp/input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c
index bd578c87b2e7..da6ec185ed5b 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -300,6 +300,14 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
if (dccp_parse_options(sk, skb))
goto out_invalid_packet;
+ /* Obtain RTT sample from SYN exchange (used by CCID 3) */
+ if (dp->dccps_options_received.dccpor_timestamp_echo) {
+ struct timeval now;
+
+ dccp_timestamp(sk, &now);
+ dp->dccps_syn_rtt = dccp_sample_rtt(sk, &now, NULL);
+ }
+
if (dccp_msk(sk)->dccpms_send_ack_vector &&
dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
DCCP_SKB_CB(skb)->dccpd_seq,