From owner-freebsd-net@FreeBSD.ORG Sat Apr 12 20:21:47 2003 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 1714037B401 for ; Sat, 12 Apr 2003 20:21:47 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DBB043FBF for ; Sat, 12 Apr 2003 20:21:46 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h3D3LfA7042220; Sat, 12 Apr 2003 21:21:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 12 Apr 2003 21:20:59 -0600 (MDT) Message-Id: <20030412.212059.42399637.imp@bsdimp.com> To: barney@pit.databus.com From: "M. Warner Losh" In-Reply-To: <20030413030500.GA64896@pit.databus.com> References: <109.225ca595.2bc723f2@aol.com> <20030412.204912.76964336.imp@bsdimp.com> <20030413030500.GA64896@pit.databus.com> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: net@freebsd.org Subject: Re: connect(2) behavior with unreacheable hosts 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: Sun, 13 Apr 2003 03:21:47 -0000 In message: <20030413030500.GA64896@pit.databus.com> Barney Wolff writes: : On Sat, Apr 12, 2003 at 08:49:12PM -0600, M. Warner Losh wrote: : > In message: <109.225ca595.2bc723f2@aol.com> : > BelletJr@aol.com writes: : > : Why does not connect(2) return any error when trying to connect to a host : > : unreachable because of an infinite loop in the routes? No time-out occurs and : > : the value 0 is returned by connect(2). : > : > Hmmmmm, you are correct. I was sure that you were nuts, but on : > -current the following program returns no error at all... Telnet : > shows the same behavior. This is clearly wrong. : : It's not just current; stable behaves exactly the same. The problem is : that the icmp time-exceeded packet gets translated into an error code : of 0, which confuses things. I've filed a PR with a suggested fix: : http://www.freebsd.org/cgi/query-pr.cgi?pr=50839 Ah. I see. I wonder if any of the net folks can review this... Warner