From owner-freebsd-current@FreeBSD.ORG Thu Apr 10 13:56:09 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 8E4CE37B401 for ; Thu, 10 Apr 2003 13:56:09 -0700 (PDT) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id C98D843F3F for ; Thu, 10 Apr 2003 13:56:08 -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 h3AKu4dN008608; Thu, 10 Apr 2003 16:56:04 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.9/8.12.9/Submit) id h3AKu4Zp008607; Thu, 10 Apr 2003 16:56:04 -0400 (EDT) Date: Thu, 10 Apr 2003 16:56:04 -0400 From: Barney Wolff To: BelletJr@aol.com Message-ID: <20030410205604.GA8446@pit.databus.com> References: <109.225ca595.2bc723f2@aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <109.225ca595.2bc723f2@aol.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: Thu, 10 Apr 2003 20:56:09 -0000 On Thu, Apr 10, 2003 at 03:45:54PM -0400, BelletJr@aol.com wrote: > 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). > My test was done with TCP/IPv4. By any chance, are you using UDP (SOCK_DGRAM) rather than TCP (SOCK_STREAM)? That sets up data structures but sends no packets, so even if an icmp time-exceeded will be returned when you do send packets, the problem can't be detected yet. -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.