tcp_notify() and the connection establishment timer
Fernando Gont
fernando at gont.com.ar
Thu Oct 21 16:23:26 PDT 2004
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 at gont.com.ar || fgont at acm.org
More information about the freebsd-net
mailing list