From owner-freebsd-net Thu Feb 3 23:53:34 2000 Delivered-To: freebsd-net@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by builder.freebsd.org (Postfix) with ESMTP id 5BBE643F1 for ; Thu, 3 Feb 2000 23:52:27 -0800 (PST) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id JAA17293; Fri, 4 Feb 2000 09:51:59 +0200 (EET) (envelope-from ru) Date: Fri, 4 Feb 2000 09:51:59 +0200 From: Ruslan Ermilov To: Stephen Macmanus Cc: freebsd-net@FreeBSD.ORG Subject: Re: Path MTU discovery Message-ID: <20000204095159.C10334@relay.ucb.crimea.ua> Mail-Followup-To: Stephen Macmanus , freebsd-net@FreeBSD.ORG References: <200002040202.SAA01528@brisbane.wrs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <200002040202.SAA01528@brisbane.wrs.com>; from Stephen Macmanus on Thu, Feb 03, 2000 at 06:02:30PM -0800 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Feb 03, 2000 at 06:02:30PM -0800, Stephen Macmanus wrote: > I have found some puzzling behavior in the path MTU discovery > implementation in Free BSD 3.4 which I hope someone can shed light > on. > > The tcp_mtudisc routine adjusts the MSS for a connection in > response to the ICMP error which triggers adjustment of the path > MTU estimate to a new value. That routine includes the following > code: > > struct tcpcb *tp = intotcpcb(inp); > struct rtentry *rt; > struct rmxp_tao *taop; > struct socket *so = inp->inp_socket; > int offered; > int mss; > > if (tp) { > rt = tcp_rtlookup(inp); > if (!rt || !rt->rt_rmx.rmx_mtu) { > tp->t_maxopd = tp->t_maxseg = tcp_mssdflt; > return; > } > taop = rmx_taop(rt->rt_rmx); > offered = taop->tao_mssopt; > mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr); > if (offered) > mss = min(mss, offered); > > . > . > . > > Both this routine and the tcp_mss routine examine the results of > tcp_rtlookup() to verify that a route to the destination address > exists. That test appears to be redundant. I can't see a situation > where the system is unable to find a route to the remote address > given that the routine can only execute after the socket assigns > local and remote address information, which includes the route lookup. > No, they do so to check the current mtu value along this route. > Similarly, I don't entirely understand the conditional execution > of the min() operation. It can only apply before the remote peer sends > the initial SYN since tao_mssopt is always non-zero after that point. > That could occur if the host generates the ICMP error by sending a TCP > segment which includes data along with the SYN flag. Examining the > tcp_output() routine, that behavior doesn't seem possible. Does anyone > know how it can occur? > > Thanks, > > Stephen > > ------------------ > Stephen Macmanus #include > Software Engineer > Wind River Systems > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message