diff options
author | Andrew Haley <aph@redhat.com> | 2007-04-18 17:07:48 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2007-04-18 17:07:48 +0000 |
commit | 431f60c0eb439bfe4808f549d5bb1fe20e72b29c (patch) | |
tree | 07f85b0b4926109a6ff7857e9f2f86e002522794 /libjava/classpath | |
parent | 3639b3fac49dfa8312fb199b6e6c45b34136c979 (diff) | |
download | gcc-431f60c0eb439bfe4808f549d5bb1fe20e72b29c.tar.gz |
UnicastConnectionManager.java (UnicastConnectionManager(int port, RMIServerSocketFactory)): Listen on "localhost", not localhost.
2007-04-17 Andrew Haley <aph@redhat.com>
* gnu/java/rmi/server/UnicastConnectionManager.java
(UnicastConnectionManager(int port, RMIServerSocketFactory)):
Listen on "localhost", not localhost.
From-SVN: r123952
Diffstat (limited to 'libjava/classpath')
-rw-r--r-- | libjava/classpath/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 244b98da883..fac684a421c 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,9 @@ +2007-04-17 Andrew Haley <aph@redhat.com> + + * gnu/java/rmi/server/UnicastConnectionManager.java + (UnicastConnectionManager(int port, RMIServerSocketFactory)): + Listen on "localhost", not localhost. + 2007-04-17 Francis Kung <fkung@redhat.com> PR classpath/31311 diff --git a/libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java b/libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java index 9715d4a31f0..a9992af9fa4 100644 --- a/libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java +++ b/libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java @@ -181,7 +181,13 @@ private UnicastConnectionManager(int port, RMIServerSocketFactory ssf) throws Re serverPort = 0; throw new java.rmi.server.ExportException("can not create Server Socket on port " + port,ioex); } - serverName = localhost; + // Note that for compatibility the serverName is "localhost", + // not UnicastConnectionManager.localhost, which is the name + // of the local box. A server listening on localhost:port is + // listening on the loopback interface, 127.0.0.1, but + // UnicastConnectionManager.localhost is an externally + // accessible IP address. + serverName = "localhost"; serverFactory = ssf; clientFactory = null; } |