[lkml]   [2000]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: bind() allowed to non-local addresses
Andi Kleen wrote:
> > The JRE compliance tests have a test which makes sure that for a
> > non-local addresses, bind() returns an error code, specifically
> Sounds like a bug that should be reported to Sun.

Hello? Send a bug to Sun? I don't see any logic here. I have traced
through the Sun code all the way to the bind() call and through to the
code in the kernel where the check for local interfaces is ignored. The
JVM code path is VERY simple and ends up in a straightforward call to
bind(). The same problem is easily reproduced in C code. There is NOT
a bug in the JVM code that handles Don't you
find it a little compelling that the nearly identical JVM code passes
the Java Compatibility test suite on Linux 2.2, Solaris, HPUX, SCO, and
even Windows?

I might even go as far as to argue that there is not a problem with the
JCK test suite either. The BSD Socket interface is documented. It may
be a little shady in some areas (this being one of them) but at least
the Sun test suite is expecting the documented (look at any man page or
sockets reference) and long standing behavior of bind(). Any argument
for changing the way bind() works needs to be able to stand up to the
challenge of developers who are expecting bind() to behave the way it
has for many years on many different platforms.

Again, there is not a bug in the JVM's handling of I offered the JVM as an example only because
it is one application that I know of expects the standardized behavior
of bind(). The bind() behavior in Linux 2.4 is not an issue because it
affects Java only -- it is an issue because it also affects other
applications and developers that are likewise expecting the traditional
bind() behavior.

Matthew Peterson
Sr. Software Engineer
Caldera Systems, Inc
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:0.121 / U:22.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site