Merge http-client-branch
authordfuchs
Mon, 16 Apr 2018 10:27:52 +0100
branchhttp-client-branch
changeset 56432 e75e22b59664
parent 56431 a30d41eadcf8 (current diff)
parent 49704 bc1c7e41e285 (diff)
child 56436 71b78a44c698
Merge
--- a/src/java.base/unix/native/libnet/net_util_md.c	Mon Apr 16 10:19:05 2018 +0100
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Mon Apr 16 10:27:52 2018 +0100
@@ -89,7 +89,9 @@
     }
     int defaultIndex;
     struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)him;
-    if (sin6->sin6_family == AF_INET6 && (sin6->sin6_scope_id == 0)) {
+    if (sin6->sin6_family == AF_INET6 && (sin6->sin6_scope_id == 0) &&
+        (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) ||
+         IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) {
         defaultIndex = (*env)->GetStaticIntField(env, ni_class,
                                                  ni_defaultIndexID);
         sin6->sin6_scope_id = defaultIndex;