diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a7d6671e33b8..617dee3ccfb1 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -429,8 +429,8 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) | |||
429 | break; | 429 | break; |
430 | 430 | ||
431 | icsk->icsk_backoff--; | 431 | icsk->icsk_backoff--; |
432 | inet_csk(sk)->icsk_rto = __tcp_set_rto(tp) << | 432 | inet_csk(sk)->icsk_rto = (tp->srtt ? __tcp_set_rto(tp) : |
433 | icsk->icsk_backoff; | 433 | TCP_TIMEOUT_INIT) << icsk->icsk_backoff; |
434 | tcp_bound_rto(sk); | 434 | tcp_bound_rto(sk); |
435 | 435 | ||
436 | skb = tcp_write_queue_head(sk); | 436 | skb = tcp_write_queue_head(sk); |
@@ -1384,6 +1384,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1384 | isn = tcp_v4_init_sequence(skb); | 1384 | isn = tcp_v4_init_sequence(skb); |
1385 | } | 1385 | } |
1386 | tcp_rsk(req)->snt_isn = isn; | 1386 | tcp_rsk(req)->snt_isn = isn; |
1387 | tcp_rsk(req)->snt_synack = tcp_time_stamp; | ||
1387 | 1388 | ||
1388 | if (tcp_v4_send_synack(sk, dst, req, | 1389 | if (tcp_v4_send_synack(sk, dst, req, |
1389 | (struct request_values *)&tmp_ext) || | 1390 | (struct request_values *)&tmp_ext) || |
@@ -1458,6 +1459,10 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1458 | newtp->advmss = tcp_sk(sk)->rx_opt.user_mss; | 1459 | newtp->advmss = tcp_sk(sk)->rx_opt.user_mss; |
1459 | 1460 | ||
1460 | tcp_initialize_rcv_mss(newsk); | 1461 | tcp_initialize_rcv_mss(newsk); |
1462 | if (tcp_rsk(req)->snt_synack) | ||
1463 | tcp_valid_rtt_meas(newsk, | ||
1464 | tcp_time_stamp - tcp_rsk(req)->snt_synack); | ||
1465 | newtp->total_retrans = req->retrans; | ||
1461 | 1466 | ||
1462 | #ifdef CONFIG_TCP_MD5SIG | 1467 | #ifdef CONFIG_TCP_MD5SIG |
1463 | /* Copy over the MD5 key from the original socket */ | 1468 | /* Copy over the MD5 key from the original socket */ |
@@ -1854,7 +1859,7 @@ static int tcp_v4_init_sock(struct sock *sk) | |||
1854 | * algorithms that we must have the following bandaid to talk | 1859 | * algorithms that we must have the following bandaid to talk |
1855 | * efficiently to them. -DaveM | 1860 | * efficiently to them. -DaveM |
1856 | */ | 1861 | */ |
1857 | tp->snd_cwnd = 2; | 1862 | tp->snd_cwnd = TCP_INIT_CWND; |
1858 | 1863 | ||
1859 | /* See draft-stevens-tcpca-spec-01 for discussion of the | 1864 | /* See draft-stevens-tcpca-spec-01 for discussion of the |
1860 | * initialization of these values. | 1865 | * initialization of these values. |