SO_REUSEADDR should not also mean SO_REUSEPORT

Kurt Miller kurt at intricatesoftware.com
Sat Feb 18 05:48:17 PST 2006


Arne H. Juul wrote:

> On Fri, 17 Feb 2006, Kurt Miller wrote:
>
>>> 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.

-Kurt


More information about the freebsd-java mailing list