[openjdk-x] Bind to a multicast address fails

Chris Hegarty chris.hegarty at oracle.com
Mon Sep 10 13:53:28 UTC 2018


On 10/09/18 10:22, vyom tewari wrote:
> ...
> Hi Andre,
> 
> i will apply your patch run our all network tests. I will update once i 
> will have result.

The patch in question is in the description of 
https://bugs.openjdk.java.net/browse/JDK-8210493, correct?
I'm posting it in this thread for reference [*].

The proposed change is in the NET_InetAddressToSockaddr
function, which is used in many places. I wonder is this
change should rather be confined to PlainDatagramSocketImpl
bind ( since this is the only reported issue arising from
limiting the addition of the scope to link-local ) ?

-Chris.

[*]

diff -Naur jdk/src/solaris/native/java/net/net_util_md.c 
jdk.new/src/solaris/native/java/net/net_util_md.c
--- a/jdk/src/solaris/native/java/net/net_util_md.c 2018-05-17 
22:24:20.000000000 +0200
+++ b/jdk/src/solaris/native/java/net/net_util_md.c 2018-08-28 
10:54:00.022607297 +0200
@@ -838,7 +838,9 @@
           * cases the used value is cached for further use.
           */
  #ifdef __linux__
- if (IN6_IS_ADDR_LINKLOCAL(&(him6->sin6_addr))) {
+ if (IN6_IS_ADDR_LINKLOCAL(&(him6->sin6_addr))
+ || IN6_IS_ADDR_MC_NODELOCAL(&(him6->sin6_addr))
+ || IN6_IS_ADDR_MC_LINKLOCAL(&(him6->sin6_addr))) {
              int cached_scope_id = 0, scope_id = 0;

              if (ia6_cachedscopeidID) {



More information about the net-dev mailing list