lkml.org 
[lkml]   [2000]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: bind() allowed to non-local addresses
Date
Followup to:  <200010182316.QAA20282@pizda.ninka.net>
By author: "David S. Miller" <davem@redhat.com>
In newsgroup: linux.dev.kernel
>
> How about first finding out why their buggy JRE detects whether an
> address is local by trying to bind() to it :-)
>
> Really, when an application feeds a specific address into bind() it
> must have good reason for selecting it. All I want to know in this
> specific instance, is why Sun's JRE is sending non-local addresses
> into bind(), that's all.
>

autofs uses the following algorithm to determine if an address is
local: connect to it as the remote end using a datagram socket (so
there isn't any actual network traffic). If the LOCAL address (which
is picked by the system) and the REMOTE address (the address under
test) are identical afterwards, the address is local.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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