From 3bfef0e36c5b820ac1ebe61327f8b502c3915579 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 28 Apr 2009 16:37:46 +0000 Subject: [PATCH] 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 --- core/src/main/java/hudson/model/Computer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 3d75e0619f..e6b75bd66f 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -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 -- GitLab