From owner-freebsd-stable@FreeBSD.ORG Wed Nov 28 18:17:27 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E001016A418; Wed, 28 Nov 2007 18:17:27 +0000 (UTC) (envelope-from w@wrzask.pl) Received: from mx.oak.pl (mx.oak.pl [217.96.108.251]) by mx1.freebsd.org (Postfix) with ESMTP id 9271613C44B; Wed, 28 Nov 2007 18:17:27 +0000 (UTC) (envelope-from w@wrzask.pl) Received: by oak.pl (Postfix, from userid 1002) id 919041CD1E; Wed, 28 Nov 2007 19:17:25 +0100 (CET) Date: Wed, 28 Nov 2007 19:17:25 +0100 From: Jan Srzednicki To: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Message-ID: <20071128181725.GP2045@oak.pl> References: <20071127135320.GJ2045@oak.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071127135320.GJ2045@oak.pl> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: connect() returns EADDRINUSE during massive host->host conn rate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 18:17:28 -0000 On Tue, Nov 27, 2007 at 02:53:20PM +0100, Jan Srzednicki wrote: > Hello, > > setting up the relevant fields, setting SO_REUSEADDR and SO_KEEPALIVE, > setting O_NONBLOCK on the descriptor. No bind(2) is performed. The > connection is initiated from inside a jail (not sure if that implies a > internal bind(2) to the jail's address). There are no connections from > the other host to the first one. And some additional info: subsequent connect()s on the same keep returning EADDRINUSE as well. In order to establish a connection, the application must create a brand new socket and then retry connect(). -- Jan Srzednicki :: http://wrzask.pl/ "Remember, remember, the fifth of November" -- V for Vendetta