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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"