--- a/src/java.base/share/classes/sun/nio/ch/Net.java Sat Nov 09 09:13:04 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/Net.java Sat Nov 09 11:48:37 2019 +0000
@@ -121,6 +121,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();
@@ -434,6 +442,8 @@
private static native boolean canJoin6WithIPv4Group0();
+ private static native boolean canUseIPv6OptionsWithIPv4LocalAddress0();
+
static FileDescriptor socket(boolean stream) throws IOException {
return socket(UNSPEC, stream);
}