]> git.neil.brown.name Git - history.git/commitdiff
[TCP]: Eliminate spurious CWND restart on every new connection.
authorDavid S. Miller <davem@nuts.ninka.net>
Wed, 9 Jul 2003 13:23:04 +0000 (06:23 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Wed, 9 Jul 2003 13:23:04 +0000 (06:23 -0700)
net/ipv4/tcp_input.c

index f629bffd0e62c04c4c5fc984c1146567726bc2db..a287499dff5f47d9d6dd8754e1ed6986401d13f2 100644 (file)
@@ -3698,6 +3698,12 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
                tp->af_specific->rebuild_header(sk);
 
                tcp_init_metrics(sk);
+
+               /* Prevent spurious tcp_cwnd_restart() on first data
+                * packet.
+                */
+               tp->lsndtime = tcp_time_stamp;
+
                tcp_init_buffer_space(sk);
 
                if (sock_flag(sk, SOCK_KEEPOPEN))
@@ -3969,6 +3975,12 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
                                tp->af_specific->rebuild_header(sk);
 
                                tcp_init_metrics(sk);
+
+                               /* Prevent spurious tcp_cwnd_restart() on
+                                * first data packet.
+                                */
+                               tp->lsndtime = tcp_time_stamp;
+
                                tcp_initialize_rcv_mss(sk);
                                tcp_init_buffer_space(sk);
                                tcp_fast_path_on(tp);