From owner-freebsd-net@FreeBSD.ORG Thu Oct 21 23:23:26 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B60916A4D7 for ; Thu, 21 Oct 2004 23:23:26 +0000 (GMT) Received: from server.frh.utn.edu.ar (server.frh.utn.edu.ar [170.210.17.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64D7343D48 for ; Thu, 21 Oct 2004 23:23:23 +0000 (GMT) (envelope-from fernando@gont.com.ar) Received: (qmail 9112 invoked from network); 21 Oct 2004 23:22:14 -0000 Received: from customer68-118-58.iplannetworks.net (HELO fernando.gont.com.ar) (gont-fernando@200.68.118.58) by server.frh.utn.edu.ar with SMTP; 21 Oct 2004 23:22:14 -0000 Message-Id: <4.3.2.7.2.20041021195220.00d5a9b0@pop.gmx.net> X-Sender: gont-fernando@server.frh.utn.edu.ar X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 21 Oct 2004 20:32:17 -0300 To: Andre Oppermann From: Fernando Gont In-Reply-To: <4177BC49.73B6D910@freebsd.org> References: <4.3.2.7.2.20041021044818.00d5a560@server.frh.utn.edu.ar> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: freebsd-net@freebsd.org Subject: Re: tcp_notify() and the connection establishment timer X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 23:23:26 -0000 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