Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2000 09:51:59 +0200
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        Stephen Macmanus <stephenm@windriver.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Path MTU discovery
Message-ID:  <20000204095159.C10334@relay.ucb.crimea.ua>
In-Reply-To: <200002040202.SAA01528@brisbane.wrs.com>; from Stephen Macmanus on Thu, Feb 03, 2000 at 06:02:30PM -0800
References:  <200002040202.SAA01528@brisbane.wrs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <std_disclaimer.h>
> 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




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