提交 d38125f2 编写于 作者: K kohsuke

only support IPv4 addresses for now, as I noticed a failure to connect when IPv6 address is used.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17521 71c3de6d-444a-0410-be80-ed276b4c234a
上级 1744f6c0
......@@ -68,6 +68,7 @@ import java.util.logging.Logger;
import java.nio.charset.Charset;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.Inet4Address;
/**
* Represents the running state of a remote computer that holds {@link Executor}s.
......@@ -598,6 +599,7 @@ public abstract class Computer extends AbstractModelObject implements AccessCont
while (e.hasMoreElements()) {
InetAddress ia = e.nextElement();
if(ia.isLoopbackAddress()) continue;
if(!(ia instanceof Inet4Address)) continue;
names.add(ia.getHostAddress());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册