From owner-freebsd-java@FreeBSD.ORG Fri Feb 17 15:54:19 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F157716A420 for ; Fri, 17 Feb 2006 15:54:19 +0000 (GMT) (envelope-from lists@intricatesoftware.com) Received: from mta2.srv.hcvlny.cv.net (mta2.srv.hcvlny.cv.net [167.206.4.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id A63FF43D45 for ; Fri, 17 Feb 2006 15:54:19 +0000 (GMT) (envelope-from lists@intricatesoftware.com) Received: from [172.16.1.72] (ool-457a77e8.dyn.optonline.net [69.122.119.232]) by mta2.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0IUU006VV9IC0BQ0@mta2.srv.hcvlny.cv.net> for freebsd-java@freebsd.org; Fri, 17 Feb 2006 10:54:12 -0500 (EST) Date: Fri, 17 Feb 2006 10:54:11 -0500 From: Kurt Miller In-reply-to: <43F4F22F.1060402@europe.yahoo-inc.com> To: freebsd-java@freebsd.org Message-id: <200602171054.11632.lists@intricatesoftware.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Content-disposition: inline References: <43F4F22F.1060402@europe.yahoo-inc.com> User-Agent: KMail/1.9 Subject: Re: SO_REUSEADDR should not also mean SO_REUSEPORT X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kurt@intricatesoftware.com List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 15:54:20 -0000 On Thursday 16 February 2006 4:44 pm, Arne Juul wrote: > Description by H=E5vard Pettersen=20 > (Havard.Pettersen@europe.yahoo-inc.com) > Ticket Opened: 2006-02-02=20 > 13:37 PST > > > > In the FreeBSD Java port, setting the reuse_address feature on a > > server socket also sets the reuse_port feature, which is not a good > > thing, since it allows multiple server sockets to bind to the same > > local port. > > > > A possible work-around is to also disable reuse_address, but this > > will disallow listening to an unused local port if a connection > > established against that port is still active, which is not good > > either. >=20 >=20 > I don't know why this code was put into the bsd jdk patches, it just > seems plain wrong to me. It makes java subtly non-portable in a very > strange manner; I suggest this code is removed. Below is the patch > I'm currently using :-) Linux and Solaris don't have SO_REUSEPORT. I believe their SO_REUSEADDR is equivalent to SO_REUSEADDR + SO_REUSEPORT on bsd. =2DKurt