Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2006 09:55:47 -0700
From:      Nate Williams <nate@yogotech.com>
To:        Kurt Miller <kurt@intricatesoftware.com>
Cc:        "Arne H. Juul" <arnej@pvv.ntnu.no>, freebsd-java@freebsd.org
Subject:   Re: SO_REUSEADDR should not also mean SO_REUSEPORT
Message-ID:  <17399.20883.741021.688682@caddis.yogotech.com>
In-Reply-To: <43F72599.4030009@intricatesoftware.com>
References:  <43F4F22F.1060402@europe.yahoo-inc.com> <200602171054.11632.lists@intricatesoftware.com> <Pine.LNX.4.62.0602172357530.8209@decibel.pvv.ntnu.no> <43F72599.4030009@intricatesoftware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> >>> 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.
> >
> >
> > no, that's not true.
> > SO_REUSEADDR behaves the same on bsd, linux, and solaris.
> >
> > I don't know if there's any way on linux or solaris
> > to get the behaviour that SO_REUSEPORT triggers on FreeBSD.
> 
> 
> Ok, thanks. I got that impression from reading some posts I found
> while googling. There was one in particular for NetBSD that
> discussed it in detail. Check out the Apr 2 portion of this
> http://www.tinyurl.com/b46gq by Jan Schaumann. Also this
> one http://tinyurl.com/9sa6a. From these posts it appears
> that SO_REUSEPORT is needed in some cases to be compatible
> with linux.


>From the early days....

  - In the Multicast constructor, the low level routine sets the
    SO_REUSEADDR option by using JSO_REUSEADDR which corresponds to a call
    to setsockopt(..SO_REUSEADDR).  To make multicast sockets work in *all*
    cases on FreeBSD, we should also set SO_REUSEPORT, else in many cases
    the multicast bind will fail.



Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17399.20883.741021.688682>