diff --git a/changelog.html b/changelog.html index 999bc811132f2e4b8867082c67147e3c58945e80..bf7a1d1a0d96dfb80204e43bcb3f4087c3b2fe9a 100644 --- a/changelog.html +++ b/changelog.html @@ -65,6 +65,9 @@ Upcoming changes
  • Fixed a persistence problem in View$PropertyList (issue 9367) +
  • + Added unique instance identifier to UDP broadcast and DNS multicast information. + (issue 9230)
  • Maven agent needs a fix for the 'hardcoded' socket connection to localhost (issue 6795) diff --git a/core/src/main/java/hudson/DNSMultiCast.java b/core/src/main/java/hudson/DNSMultiCast.java index e6065d74e17d6734fa5bd0810f9881881441280e..f5c33a3edfb736836712f82fc30919e577953cfc 100644 --- a/core/src/main/java/hudson/DNSMultiCast.java +++ b/core/src/main/java/hudson/DNSMultiCast.java @@ -1,6 +1,7 @@ package hudson; import hudson.model.Hudson; +import hudson.Util; import javax.jmdns.JmDNS; import javax.jmdns.ServiceInfo; @@ -39,6 +40,8 @@ public class DNSMultiCast implements Closeable { if (tal!=null) props.put("slave-port",String.valueOf(tal.getPort())); + props.put("server-id", Util.getDigestOf(hudson.getSecretKey())); + jmdns.registerService(ServiceInfo.create("_hudson._tcp.local.","hudson", 80,0,0,props)); // for backward compatibility jmdns.registerService(ServiceInfo.create("_jenkins._tcp.local.","jenkins", diff --git a/core/src/main/java/hudson/UDPBroadcastThread.java b/core/src/main/java/hudson/UDPBroadcastThread.java index bb1e3e8965ba005170ca566bf06238f8996ce31c..877e3604acf11c57d7e56f9f0bb7c0d9183fd803 100644 --- a/core/src/main/java/hudson/UDPBroadcastThread.java +++ b/core/src/main/java/hudson/UDPBroadcastThread.java @@ -25,6 +25,7 @@ package hudson; import hudson.model.Hudson; import hudson.util.OneShotEvent; +import hudson.Util; import java.io.IOException; import java.net.BindException; @@ -77,6 +78,7 @@ public class UDPBroadcastThread extends Thread { StringBuilder rsp = new StringBuilder(""); tag(rsp,"version",Hudson.VERSION); tag(rsp,"url",hudson.getRootUrl()); + tag(rsp,"server-id", Util.getDigestOf(hudson.getSecretKey())); tag(rsp,"slave-port",tal==null?null:tal.getPort()); for (UDPBroadcastFragment f : UDPBroadcastFragment.all())