]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/tcp_output.c
tcp: update also tcp_output with regard to RFC 5681
[net-next-2.6.git] / net / ipv4 / tcp_output.c
index 01b94b8d9ec9459c9f463842f25c913e6667e6c1..ea09d2fd50c794a3f04a7178cb7f54cb58c42e2a 100644 (file)
@@ -224,16 +224,10 @@ void tcp_select_initial_window(int __space, __u32 mss,
                }
        }
 
-       /* Set initial window to value enough for senders,
-        * following RFC2414. Senders, not following this RFC,
-        * will be satisfied with 2.
-        */
+       /* Set initial window to value enough for senders, following RFC5681. */
        if (mss > (1 << *rcv_wscale)) {
-               int init_cwnd = 4;
-               if (mss > 1460 * 3)
-                       init_cwnd = 2;
-               else if (mss > 1460)
-                       init_cwnd = 3;
+               int init_cwnd = rfc3390_bytes_to_packets(mss);
+
                /* when initializing use the value from init_rcv_wnd
                 * rather than the default from above
                 */