ASF Bugzilla – Attachment 20995 Details for
Bug 43641
Using the bind attribute for Membership tag causes Multicast to break
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against 6.0.14
WAO-tomcat.6.0.14.multicast_bind_fix.diff (text/plain), 1.70 KB, created by
Ruediger Pluem
on 2007-10-17 07:59:25 UTC
(
hide
)
Description:
Patch against 6.0.14
Filename:
MIME Type:
Creator:
Ruediger Pluem
Created:
2007-10-17 07:59:25 UTC
Size:
1.70 KB
patch
obsolete
>diff -Nru apache-tomcat-6.0.14-src.orig/java/org/apache/catalina/tribes/membership/McastServiceImpl.java apache-tomcat-6.0.14-src/java/org/apache/catalina/tribes/membership/McastServiceImpl.java >--- apache-tomcat-6.0.14-src.orig/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 2007-07-20 04:21:20.000000000 +0200 >+++ apache-tomcat-6.0.14-src/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 2007-08-21 15:53:56.000000000 +0200 >@@ -22,6 +22,7 @@ > import java.net.DatagramPacket; > import java.net.InetAddress; > import java.net.MulticastSocket; >+import java.net.BindException; > > import org.apache.catalina.tribes.MembershipListener; > import java.util.Arrays; >@@ -162,8 +163,23 @@ > } > > protected void setupSocket() throws IOException { >- if (mcastBindAddress != null) socket = new MulticastSocket(new InetSocketAddress(mcastBindAddress, port)); >- else socket = new MulticastSocket(port); >+ if (mcastBindAddress != null) { >+ try { >+ socket = new MulticastSocket(new InetSocketAddress(address, >+ port)); >+ } >+ catch (BindException e) { >+ /* >+ * On some plattforms (e.g. Linux) it is not possible to bind >+ * to the multicast address. In this case only bind to the >+ * port. >+ */ >+ socket = new MulticastSocket(port); >+ } >+ } >+ else { >+ socket = new MulticastSocket(port); >+ } > socket.setLoopbackMode(false); //hint that we don't need loop back messages > if (mcastBindAddress != null) { > if(log.isInfoEnabled())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43641
:
20995
|
20999