提交 3bfef0e3 编写于 作者: K kohsuke

reject IPv6 names. Revisit later as IPv6 should work in theory --- it's just...

reject IPv6 names. Revisit later as IPv6 should work in theory --- it's just that my limited experiment revealed that it doesn't seem to be working

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17573 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f1a00626
......@@ -578,7 +578,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
for( String address : getChannel().call(new ListPossibleNames())) {
try {
InetAddress ia = InetAddress.getByName(address);
if(ia.isReachable(500))
if(ia.isReachable(500) && ia instanceof Inet4Address)
return ia.getCanonicalHostName();
} catch (IOException e) {
// if a given name fails to parse on this host, we get this error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册