You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2014/06/12 12:42:55 UTC

svn commit: r1602115 - /tomcat/jk/trunk/native/common/jk_connect.c

Author: mturk
Date: Thu Jun 12 10:42:55 2014
New Revision: 1602115

URL: http://svn.apache.org/r1602115
Log:
Make sure we have prefer_ipv6 set for hostnames containig colon

Modified:
    tomcat/jk/trunk/native/common/jk_connect.c

Modified: tomcat/jk/trunk/native/common/jk_connect.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=1602115&r1=1602114&r2=1602115&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_connect.c (original)
+++ tomcat/jk/trunk/native/common/jk_connect.c Thu Jun 12 10:42:55 2014
@@ -443,7 +443,14 @@ int jk_resolve(const char *host, int por
         memset(&hints, 0, sizeof(hints));
         hints.ai_socktype = SOCK_STREAM;
         hints.ai_protocol = IPPROTO_TCP;
+        
 #if JK_HAVE_IPV6
+        if (strchr(host, ':')) {
+            /* If host name contains collon this must be IPV6 address.
+             * Set prefer_ipv6 flag in this case if it wasn't set already
+             */
+            prefer_ipv6 = 1;            
+        }
         if (prefer_ipv6)
             hints.ai_family = JK_INET6;
         else



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