Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 18221 invoked from network); 7 Dec 2007 18:47:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 18:47:53 -0000 Received: (qmail 26511 invoked by uid 500); 7 Dec 2007 18:47:42 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 26402 invoked by uid 500); 7 Dec 2007 18:47:41 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 26391 invoked by uid 99); 7 Dec 2007 18:47:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 10:47:41 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 18:47:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 046351A9832; Fri, 7 Dec 2007 10:47:30 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r602176 - /apr/apr/trunk/network_io/unix/sockaddr.c Date: Fri, 07 Dec 2007 18:47:29 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071207184730.046351A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Fri Dec 7 10:47:29 2007 New Revision: 602176 URL: http://svn.apache.org/viewvc?rev=602176&view=rev Log: Where hostname is provided in ipv4 numeric form, as we've foolishly cooerced all of our IPV4_MAPPED_IPV6 addresses, we'll need to accept this as a socket lookup call! Unfortunately, we failed to resolve, for example, 127.0.0.1 for INET6 addressing, where we would resolve ::ffff:127.0.0.1 But the AI_V4MAPPED flag will let us resolve this address after attempting to resolve the IPV6 notation. Feedback and careful review is desired before this is applied to branches 1.2 and 0.9. Thanks. Modified: apr/apr/trunk/network_io/unix/sockaddr.c Modified: apr/apr/trunk/network_io/unix/sockaddr.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sockaddr.c?rev=602176&r1=602175&r2=602176&view=diff ============================================================================== --- apr/apr/trunk/network_io/unix/sockaddr.c (original) +++ apr/apr/trunk/network_io/unix/sockaddr.c Fri Dec 7 10:47:29 2007 @@ -344,6 +344,11 @@ servname = apr_itoa(p, port); #endif /* OSF1 */ } +#if APR_HAVE_IPV6 && defined(AI_V4MAPPED) + else if (family == APR_INET6) { + hints.ai_flags |= AI_V4MAPPED; + } +#endif error = getaddrinfo(hostname, servname, &hints, &ai_list); #ifdef HAVE_GAI_ADDRCONFIG if (error == EAI_BADFLAGS && family == APR_UNSPEC) {