Author: mturk Date: Fri Apr 11 05:56:38 2014 New Revision: 1586578 URL: http://svn.apache.org/r1586578 Log: Ensure that we use port buffer with getaddrinfo call
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=1586578&r1=1586577&r2=1586578&view=diff ============================================================================== --- tomcat/jk/trunk/native/common/jk_connect.c (original) +++ tomcat/jk/trunk/native/common/jk_connect.c Fri Apr 11 05:56:38 2014 @@ -454,7 +454,7 @@ int jk_resolve(const char *host, int por */ if (error == EAI_FAMILY && prefer_ipv6) { hints.ai_family = JK_INET; - error = getaddrinfo(host, NULL, &hints, &ai_list); + error = getaddrinfo(host, pbufptr, &hints, &ai_list); } #endif if (error) { @@ -466,7 +466,7 @@ int jk_resolve(const char *host, int por if (prefer_ipv6) { ai = ai_list; while (ai) { - if (ai->ai_family == AF_INET6) { + if (ai->ai_family == JK_INET6) { /* ignore elements without required address info */ if((ai->ai_addr != NULL) && (ai->ai_addrlen > 0)) { family = JK_INET6; @@ -480,7 +480,7 @@ int jk_resolve(const char *host, int por if (ai == NULL) { ai = ai_list; while (ai) { - if (ai->ai_family == AF_INET) { + if (ai->ai_family == JK_INET) { /* ignore elements without required address info */ if((ai->ai_addr != NULL) && (ai->ai_addrlen > 0)) { family = JK_INET; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org