From afaf59318ca0b0ce2fce8bbe1d5f8ae5ae0d282e Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 8 Apr 2014 15:58:15 -0700 Subject: [PATCH] BUG702: RPC Router fails to acquire IP address of the host Removed the check that only picked private address space addresses. Now we pick IPv4 address belonging in any category that is not loopback address. Change-Id: Idf98d1c64306059029bc4a6347d1ff952d45a6ba Signed-off-by: Abhishek Kumar --- .../controller/sal/connector/remoterpc/ServerImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImpl.java b/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImpl.java index 722ca06879..d256b998d4 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImpl.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImpl.java @@ -254,7 +254,6 @@ public class ServerImpl implements RemoteRpcServer { e = NetworkInterface.getNetworkInterfaces(); } catch (SocketException e1) { _logger.error("Failed to get list of interfaces", e1); - //throw new RuntimeException("Failed to acquire list of interfaces", e1); return null; } while (e.hasMoreElements()) { @@ -265,7 +264,7 @@ public class ServerImpl implements RemoteRpcServer { while (ee.hasMoreElements()) { InetAddress i = (InetAddress) ee.nextElement(); _logger.debug("Trying address {}", i); - if ((i instanceof Inet4Address) && (i.isSiteLocalAddress())) { + if ((i instanceof Inet4Address) && (!i.isLoopbackAddress())) { String hostAddress = i.getHostAddress(); _logger.debug("Settled on host address {}", hostAddress); return hostAddress; -- 2.36.6