From owner-freebsd-current@FreeBSD.ORG Sat Apr 12 20:09:03 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41DB337B401 for ; Sat, 12 Apr 2003 20:09:03 -0700 (PDT) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id B468F43FBD for ; Sat, 12 Apr 2003 20:09:01 -0700 (PDT) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.9/8.12.9) with ESMTP id h3D38xdN065178; Sat, 12 Apr 2003 23:08:59 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.9/8.12.9/Submit) id h3D38xFZ065177; Sat, 12 Apr 2003 23:08:59 -0400 (EDT) Date: Sat, 12 Apr 2003 23:08:59 -0400 From: Barney Wolff To: "M. Warner Losh" Message-ID: <20030413030859.GB64896@pit.databus.com> References: <109.225ca595.2bc723f2@aol.com> <20030412.204912.76964336.imp@bsdimp.com> <20030412.210042.104160257.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030412.210042.104160257.imp@bsdimp.com> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) cc: current@freebsd.org Subject: Re: connect(2) behavior with unreacheable hosts X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 03:09:03 -0000 On Sat, Apr 12, 2003 at 09:00:42PM -0600, M. Warner Losh wrote: > I just read the rest of the thread: > > 1) route loops don't matter. connect should timeout after a while, > and on stable it is like 75 seconds. loop elsewhere doesn't matter > because it is the same thing as a black hole. You don't get the > handshake back, you timeout. Doesn't matter why (and the sending > host can't tell them apart). > 2) This is clearly TCP. > 3) telnet 1.2.3.4 does the following bogusly: > Trying 1.2.3.4... > Connected to 1.2.3.4. > Escape character is '^]'. > Connection closed by foreign host. > > All the lines are printed in < 1s. > > However, this may be because I live behind a NAT box. Any chance you > did your testing in a similar environment, which is causing your > confusion. On my non-NAT'd boxes, this works as expected. The catch is that connecting to 1.2.3.4 behaves differently depending on whether: 1. ICMP host-unreach 2. Nothing at all 3. ICMP time-exceeded comes back. The first two cases are handled correctly, the third is not. -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.