< prev index next >
src/java.base/unix/native/libnio/ch/Net.c
Print this page
rev 54103 : imported patch ipv6-only-build
@@ -203,11 +203,11 @@
return handleSocketError(env, errno);
}
/* Disable IPV6_V6ONLY to ensure dual-socket support */
if (domain == AF_INET6) {
- int arg = 0;
+ int arg = 1; // V6 only
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&arg,
sizeof(int)) < 0) {
JNU_ThrowByNameWithLastError(env,
JNU_JAVANETPKG "SocketException",
"Unable to set IPV6_V6ONLY");
< prev index next >