Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Aug 2010 09:02:38 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r211603 - stable/7/sys/netinet
Message-ID:  <201008220902.o7M92cHv096710@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Sun Aug 22 09:02:38 2010
New Revision: 211603
URL: http://svn.freebsd.org/changeset/base/211603

Log:
  MFC r211333:
  
    Fix the interaction between 'ICMP fragmentation needed' MTU updates,
    path MTU discovery and the tcp_minmss limiter for very small MTU's.

Modified:
  stable/7/sys/netinet/tcp_output.c
  stable/7/sys/netinet/tcp_subr.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netinet/tcp_output.c
==============================================================================
--- stable/7/sys/netinet/tcp_output.c	Sun Aug 22 09:01:58 2010	(r211602)
+++ stable/7/sys/netinet/tcp_output.c	Sun Aug 22 09:02:38 2010	(r211603)
@@ -1130,8 +1130,10 @@ timer:
 	 * This might not be the best thing to do according to RFC3390
 	 * Section 2. However the tcp hostcache migitates the problem
 	 * so it affects only the first tcp connection with a host.
+	 *
+	 * NB: Don't set DF on small MTU/MSS to have a safe fallback.
 	 */
-	if (path_mtu_discovery)
+	if (path_mtu_discovery && tp->t_maxopd > tcp_minmss)
 		ip->ip_off |= IP_DF;
 
 	error = ip_output(m, tp->t_inpcb->inp_options, NULL,

Modified: stable/7/sys/netinet/tcp_subr.c
==============================================================================
--- stable/7/sys/netinet/tcp_subr.c	Sun Aug 22 09:01:58 2010	(r211602)
+++ stable/7/sys/netinet/tcp_subr.c	Sun Aug 22 09:02:38 2010	(r211603)
@@ -1241,11 +1241,9 @@ tcp_ctlinput(int cmd, struct sockaddr *s
 					    if (!mtu)
 						mtu = ip_next_mtu(ip->ip_len,
 						 1);
-					    if (mtu < max(296, (tcp_minmss)
-						 + sizeof(struct tcpiphdr)))
-						mtu = 0;
-					    if (!mtu)
-						mtu = tcp_mssdflt
+					    if (mtu < tcp_minmss
+						 + sizeof(struct tcpiphdr))
+						mtu = tcp_minmss
 						 + sizeof(struct tcpiphdr);
 					    /*
 					     * Only cache the the MTU if it



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008220902.o7M92cHv096710>