This commit is contained in:
Prasanta Sadhukhan 2018-12-04 13:35:04 +05:30
commit 5f2062b484
304 changed files with 5022 additions and 2024 deletions

View file

@ -305,12 +305,12 @@ jint IPv6_supported()
}
/*
* If fd 0 is a socket it means we've been launched from inetd or
* If fd 0 is a socket it means we may have been launched from inetd or
* xinetd. If it's a socket then check the family - if it's an
* IPv4 socket then we need to disable IPv6.
*/
if (getsockname(0, &sa.sa, &sa_len) == 0) {
if (sa.sa.sa_family != AF_INET6) {
if (sa.sa.sa_family == AF_INET) {
close(fd);
return JNI_FALSE;
}