From owner-svn-src-all@FreeBSD.ORG Sun Aug 22 09:02:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B85AD10656B1; Sun, 22 Aug 2010 09:02:38 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D16C8FC0C; Sun, 22 Aug 2010 09:02:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M92cTr096713; Sun, 22 Aug 2010 09:02:38 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M92cHv096710; Sun, 22 Aug 2010 09:02:38 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008220902.o7M92cHv096710@svn.freebsd.org> From: Andre Oppermann Date: Sun, 22 Aug 2010 09:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211603 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 09:02:38 -0000 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