Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2004 20:32:17 -0300
From:      Fernando Gont <fernando@gont.com.ar>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: tcp_notify() and the connection establishment timer
Message-ID:  <4.3.2.7.2.20041021195220.00d5a9b0@pop.gmx.net>
In-Reply-To: <4177BC49.73B6D910@freebsd.org>
References:  <4.3.2.7.2.20041021044818.00d5a560@server.frh.utn.edu.ar>

next in thread | previous in thread | raw e-mail | index | archive | help
At 15:40 21/10/2004 +0200, Andre Oppermann wrote:

> > Maybe I'm missing something, but I get the impression that, considering the
> > value (six seconds) to which the RTO is initialized, that part that says
> >
> >         } else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 &&
> >             tp->t_softerror) {
> >                 tcp_drop(tp, error);
> >                 return (struct inpcb *)0;
> >
> > will never be executed, as the connection-establishment timer will always
> > timeout before the evaluated condition becomes true.
> >
> > Am I missing something? Or is it that this code is there just in case the
> > initial RTO is reduced to such a value that, in that case, this code would
> > kick in before the 75-seconds tconnection-establishment timer?
>
>Yes, tcp_notify() gets called from icmp_input() when ICMP unreachable or
>related error messages from the network are received.  In those cases
>you don't want to wait the full 75 seconds because the network tells
>you that a connection cannot be established to that destination.  It
>doesn't do that the first time the network tells us that to avoid too
>fast reaction on spurious network problems, outages or re-routings.

I'd agree with this idea. However, my point is that, given the initial RTO 
of 6 seconds, the 75-second timer will always expire before the connection 
is aborted due to the received ICMP error messages.

That is, either the connection-establishment timer should be set to a 
larger value, or else fewer retransmissions and fewer ICMP errors should be 
required to abort a connection.

If you have a copy of Stevens' TCPv2 at hand, there's a diagram on page 828 
that shows this. The 75-second timer will expire *before* tx->t_rxtshift > 3.


--
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@acm.org




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