APR cannot listen both on IPV4 and IPV6 on some platforms
(e.g BSD and Windows).
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@525132
13f79535-47bb-0310-9956-
ffa450edef68
addressStr = address.getHostAddress();
}
int family = Socket.APR_INET;
+ if (Library.APR_HAVE_IPV6) {
+ if (addressStr == null) {
+ if (!OS.IS_BSD && !OS.IS_WIN32 && !OS.IS_WIN64)
+ family = Socket.APR_UNSPEC;
+ } else if (addressStr.indexOf(':') >= 0) {
+ family = Socket.APR_UNSPEC;
+ }
+ }
+
if (Library.APR_HAVE_IPV6 && (addressStr == null || addressStr.indexOf(':') >= 0)) {
family = Socket.APR_UNSPEC;
}