equal
deleted
inserted
replaced
303 */ |
303 */ |
304 return JNI_FALSE; |
304 return JNI_FALSE; |
305 } |
305 } |
306 |
306 |
307 /* |
307 /* |
308 * If fd 0 is a socket it means we've been launched from inetd or |
308 * If fd 0 is a socket it means we may have been launched from inetd or |
309 * xinetd. If it's a socket then check the family - if it's an |
309 * xinetd. If it's a socket then check the family - if it's an |
310 * IPv4 socket then we need to disable IPv6. |
310 * IPv4 socket then we need to disable IPv6. |
311 */ |
311 */ |
312 if (getsockname(0, &sa.sa, &sa_len) == 0) { |
312 if (getsockname(0, &sa.sa, &sa_len) == 0) { |
313 if (sa.sa.sa_family != AF_INET6) { |
313 if (sa.sa.sa_family == AF_INET) { |
314 close(fd); |
314 close(fd); |
315 return JNI_FALSE; |
315 return JNI_FALSE; |
316 } |
316 } |
317 } |
317 } |
318 |
318 |