Author: remy.maucherat(a)jboss.com
Date: 2012-02-10 11:46:18 -0500 (Fri, 10 Feb 2012)
New Revision: 1955
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
trunk/webapps/docs/changelog.xml
Log:
AS7-3607: Fix bogus issue with lame hack.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-02-08 17:33:26 UTC (rev
1954)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-02-10 16:46:18 UTC (rev
1955)
@@ -553,7 +553,13 @@
} else if (addressStr.indexOf(':') >= 0) {
family = Socket.APR_UNSPEC;
}
- }
+ if (!Boolean.getBoolean("java.net.preferIPv4Stack")) {
+ family = Socket.APR_INET6;
+ if (addressStr != null && addressStr.indexOf(':') < 0)
{
+ addressStr = "::ffff:" + addressStr;
+ }
+ }
+ }
// Sendfile usage on systems which don't support it cause major problems
if (useSendfile && !Library.APR_HAS_SENDFILE) {
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-02-08 17:33:26 UTC (rev 1954)
+++ trunk/webapps/docs/changelog.xml 2012-02-10 16:46:18 UTC (rev 1955)
@@ -22,6 +22,10 @@
<fix>
<bug>52606</bug>: Body replay with AJP. (markt)
</fix>
+ <fix>
+ <jboss-jira>AS7-3607</jboss-jira>: Support ipv4 addresses as ipv6
when the
+ JVM is configured to prefer ipv6. (remm)
+ </fix>
</changelog>
</subsection>
</section>