-
Bug
-
Resolution: Done
-
Major
-
2.2.9
-
None
in 2.2.7 UDP used
InetAddress.getLocalHost().getHostAddress()
to lookup the default NIC. which works quite fine. 2.2.9 uses Util.getFirstNonLoopbackAddress() which is not the same. in our case it reports a NIC that is only virtual and not reachable from outside. To be more specific it takes the interface of an VMWare (vmnet1). I will attach the output of ifconfig to make things clear.
If you do not want to change this pls at least add a proberty that enforces using of InetAddress.getLocalHost() optionally. Thus the following code in UDP
if(bind_addr == null) {
bind_addr=Util.getFirstNonLoopbackAddress();
}
if(bind_addr == null)
bind_addr=InetAddress.getLocalHost();
Which does not make much sense now (second if is never reached) should be cached to something like
if(bind_addr == null && !useLocalHost) {
bind_addr=Util.getFirstNonLoopbackAddress();
}
if(bind_addr == null)
bind_addr=InetAddress.getLocalHost();