--- a/src/java.base/share/classes/sun/nio/ch/Net.java Mon Nov 11 10:38:24 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/Net.java Mon Nov 11 10:39:49 2019 +0000
@@ -126,6 +126,14 @@
return canJoin6WithIPv4Group0();
}
+ /**
+ * Tells whether IPV6_XXX socket options should be used on an IPv6 socket
+ * that is bound to an IPv4 address.
+ */
+ static boolean canUseIPv6OptionsWithIPv4LocalAddress() {
+ return canUseIPv6OptionsWithIPv4LocalAddress0();
+ }
+
public static InetSocketAddress checkAddress(SocketAddress sa) {
if (sa == null)
throw new NullPointerException();
@@ -439,6 +447,8 @@
private static native boolean canJoin6WithIPv4Group0();
+ private static native boolean canUseIPv6OptionsWithIPv4LocalAddress0();
+
static FileDescriptor socket(boolean stream) throws IOException {
return socket(UNSPEC, stream);
}