tcp: add tcp_min_snd_mss sysctl
[pandora-kernel.git] / net / ipv4 / tcp_output.c
index cb1130c..a3a1ac5 100644 (file)
@@ -56,6 +56,7 @@ int sysctl_tcp_tso_win_divisor __read_mostly = 3;
 
 int sysctl_tcp_mtu_probing __read_mostly = 0;
 int sysctl_tcp_base_mss __read_mostly = TCP_BASE_MSS;
+int sysctl_tcp_min_snd_mss __read_mostly = TCP_MIN_SND_MSS;
 
 /* By default, RFC2861 behavior.  */
 int sysctl_tcp_slow_start_after_idle __read_mostly = 1;
@@ -1172,8 +1173,7 @@ int tcp_mtu_to_mss(const struct sock *sk, int pmtu)
        mss_now -= icsk->icsk_ext_hdr_len;
 
        /* Then reserve room for full set of TCP options and 8 bytes of data */
-       if (mss_now < TCP_MIN_SND_MSS)
-               mss_now = TCP_MIN_SND_MSS;
+       mss_now = max(mss_now, sysctl_tcp_min_snd_mss);
 
        /* Now subtract TCP options size, not including SACKs */
        mss_now -= tp->tcp_header_len - sizeof(struct tcphdr);