svn commit: r211602 - stable/8/sys/netinet
Andre Oppermann
andre at FreeBSD.org
Sun Aug 22 09:01:59 UTC 2010
Author: andre
Date: Sun Aug 22 09:01:58 2010
New Revision: 211602
URL: http://svn.freebsd.org/changeset/base/211602
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/8/sys/netinet/tcp_output.c
stable/8/sys/netinet/tcp_subr.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cam/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/netinet/tcp_output.c
==============================================================================
--- stable/8/sys/netinet/tcp_output.c Sun Aug 22 08:47:51 2010 (r211601)
+++ stable/8/sys/netinet/tcp_output.c Sun Aug 22 09:01:58 2010 (r211602)
@@ -1186,8 +1186,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 (V_path_mtu_discovery)
+ if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss)
ip->ip_off |= IP_DF;
error = ip_output(m, tp->t_inpcb->inp_options, NULL,
Modified: stable/8/sys/netinet/tcp_subr.c
==============================================================================
--- stable/8/sys/netinet/tcp_subr.c Sun Aug 22 08:47:51 2010 (r211601)
+++ stable/8/sys/netinet/tcp_subr.c Sun Aug 22 09:01:58 2010 (r211602)
@@ -1330,11 +1330,9 @@ tcp_ctlinput(int cmd, struct sockaddr *s
if (!mtu)
mtu = ip_next_mtu(ip->ip_len,
1);
- if (mtu < max(296, V_tcp_minmss
- + sizeof(struct tcpiphdr)))
- mtu = 0;
- if (!mtu)
- mtu = V_tcp_mssdflt
+ if (mtu < V_tcp_minmss
+ + sizeof(struct tcpiphdr))
+ mtu = V_tcp_minmss
+ sizeof(struct tcpiphdr);
/*
* Only cache the the MTU if it
More information about the svn-src-all
mailing list