tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <mailing-tomcat-...@schoenhaber.de>
Subject Re: svn commit: r406857 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Date Tue, 16 May 2006 10:21:36 GMT
Am Dienstag, den 16.05.2006, 07:09 +0000 schrieb mturk@apache.org:
> Author: mturk
> Date: Tue May 16 00:09:43 2006
> New Revision: 406857
> 
> URL: http://svn.apache.org/viewcvs?rev=406857&view=rev
> Log:
> Use APR_UNSPEC only if the provided address
> actually is the IPV6 address.
> 
> Modified:
>     tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
> 
> Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
> URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=406857&r1=406856&r2=406857&view=diff
> ==============================================================================
> --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
> +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue
May 16 00:09:43 2006
> @@ -553,8 +553,10 @@
>              addressStr = address.getHostAddress();
>          }
>          int family = Socket.APR_INET;
> -        if (Library.APR_HAVE_IPV6)
> -            family= Socket.APR_UNSPEC;
> +        if (Library.APR_HAVE_IPV6 && addressStr != null) {
> +            if (addressStr.indexOf(':') >= 0)
> +                family= Socket.APR_UNSPEC;
> +        }
>          long inetAddress = Address.info(addressStr, family,
>                  port, 0, rootPool);
>          // Create the APR server socket

Could you please explain the reason for this change?

Using APR_UNSPEC was introduced to make the APR Connector also listen on
IPv6 addresses if no specific address is configured - this way
resembling the behaviour of the Base Connector.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37788
AFAICT by the change above this improvement is effectively undone.

Regards
  mks



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message