From owner-freebsd-java@FreeBSD.ORG Thu Feb 23 16:44:09 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 3B4FE16A420 for ; Thu, 23 Feb 2006 16:44:09 +0000 (GMT) (envelope-from arnej@pvv.ntnu.no) Received: from decibel.pvv.ntnu.no (decibel.pvv.ntnu.no [129.241.210.179]) by mx1.FreeBSD.org (Postfix) with SMTP id 2EA5743D4C for ; Thu, 23 Feb 2006 16:44:06 +0000 (GMT) (envelope-from arnej@pvv.ntnu.no) Received: (qmail 11015 invoked by uid 27959); 23 Feb 2006 16:44:05 -0000 Date: Thu, 23 Feb 2006 17:44:05 +0100 (CET) From: "Arne H. Juul" To: Kurt Miller In-Reply-To: <200602211011.39387.kurt@intricatesoftware.com> Message-ID: References: <43F4F22F.1060402@europe.yahoo-inc.com> <17399.20883.741021.688682@caddis.yogotech.com> <200602211011.39387.kurt@intricatesoftware.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Nate Williams , freebsd-java@freebsd.org Subject: Re: SO_REUSEADDR should not also mean SO_REUSEPORT X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2006 16:44:09 -0000 On Tue, 21 Feb 2006, Kurt Miller wrote: > Thanks for the explanation and also to Nate for the Multicast > history. I've looked into this a bit more over the weekend and > found that the network stack promotes SO_REUSEADDR to include > SO_REUSEPORT for multicast addresses, so I believe that case is > covered already. I ran the network jck's on the 1.5 jvm with your > patch and found that SO_REUSEPORT is still needed to pass the jck's > but for datagram sockets only. I guess we have to emulate Solaris to pass these, even if I think the Solaris behaviour is a bit bad. > Could you try this patch and test it with the program you referred > to above? I'll see if I can try this tomorrow; it *should* work for the applications I'm worried about since those are all using TCP sockets only. Please update the comment to say why the "bug-compatibility" is there. Something like: /* * On Solaris, SO_REUSEADDR will allow multiple datagram * sockets to bind to the same port. The network jck tests * for this "feature", so we need to emulate it by turning on * SO_REUSEPORT as well for that combination. */ - Arne H. J.