Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root
Alan.Bateman at oracle.com
Thu Oct 21 06:05:20 PDT 2010
Chris Hegarty wrote:
> Hi Michael,
> On some Linuxes, when bound to the loopback interface, sendto will
> fail and errno will be set to EINVAL. When that happens, don't throw
> an exception, just return false. We already do this in the case where
> we cannot create raw sockets, i.e. when not running as root.
Chris - is this a kernel bug where it should be returning EHOSTUNREACH
or some other error instead? It is specific to the loopback interface so
do you have the same issue when bound to a real interface?
More information about the net-dev