From d38125f297db813c48b2304dd95482fb307269dc Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sun, 26 Apr 2009 16:44:43 +0000 Subject: [PATCH] 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 --- core/src/main/java/hudson/model/Computer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 9487c60d5e..b862cccb43 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -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()); } } -- GitLab