tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
[pandora-kernel.git] / net / ipv4 / tcp_timer.c
index ecd44b0..7f2eb80 100644 (file)
@@ -127,6 +127,7 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
                        mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
                        mss = min(sysctl_tcp_base_mss, mss);
                        mss = max(mss, 68 - tp->tcp_header_len);
+                       mss = max(mss, sysctl_tcp_min_snd_mss);
                        icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
                        tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
                }
@@ -334,7 +335,6 @@ void tcp_retransmit_timer(struct sock *sk)
                 * connection. If the socket is an orphan, time it out,
                 * we cannot allow such beasts to hang infinitely.
                 */
-#ifdef TCP_DEBUG
                struct inet_sock *inet = inet_sk(sk);
                if (sk->sk_family == AF_INET) {
                        LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
@@ -348,7 +348,6 @@ void tcp_retransmit_timer(struct sock *sk)
                               &np->daddr, ntohs(inet->inet_dport),
                               inet->inet_num, tp->snd_una, tp->snd_nxt);
                }
-#endif
 #endif
                if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
                        tcp_write_err(sk);