You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/09/12 21:46:13 UTC

cvs commit: apr/network_io/unix sa_common.c

trawick     01/09/12 12:46:13

  Modified:    .        CHANGES
               network_io/unix sa_common.c
  Log:
  Don't search for IPv6 names in apr_sockaddr_info_get() if the
  application doesn't specify the family (i.e., the application
  passes in AF_UNSPEC) and APR isn't built with IPv6 support.
  
  Revision  Changes    Path
  1.154     +6 -1      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- CHANGES	2001/09/09 06:04:40	1.153
  +++ CHANGES	2001/09/12 19:46:12	1.154
  @@ -1,5 +1,10 @@
   Changes with APR b1  
  -   
  +
  +  *) Don't search for IPv6 names in apr_sockaddr_info_get() if the 
  +     application doesn't specify the family (i.e., the application
  +     passes in AF_UNSPEC) and APR isn't built with IPv6 support.  
  +     [Jeff Trawick]
  +
     *) Fix the API for the apr_proc_create() call on Win32.  Several
        bad assumptions are gone, including a mismatch between unix and
        win32, where win32 was defaulting to create detached.  Also fixes
  
  
  
  1.45      +9 -1      apr/network_io/unix/sa_common.c
  
  Index: sa_common.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- sa_common.c	2001/08/29 15:20:24	1.44
  +++ sa_common.c	2001/09/12 19:46:12	1.45
  @@ -345,7 +345,15 @@
   
           memset(&hints, 0, sizeof(hints));
           hints.ai_flags = 0; /* XXX: might need a way to turn on AI_CANONNAME */
  -        hints.ai_family = family;
  +#if !APR_HAVE_IPV6
  +        /* we can't talk IPv6 so we might as well not search for IPv6
  +         * addresses
  +         */
  +        if (family == AF_UNSPEC)
  +            hints.ai_family = AF_INET;
  +        else
  +#endif
  +            hints.ai_family = family;
           hints.ai_socktype = SOCK_STREAM;
           hints.ai_protocol = 0;
           apr_snprintf(num, sizeof(num), "%d", port);
  
  
  

Re: cvs commit: apr/network_io/unix sa_common.c

Posted by Jeff Trawick <tr...@attglobal.net>.
trawick@apache.org writes:

> trawick     01/09/12 12:46:13
> 
>   Modified:    .        CHANGES
>                network_io/unix sa_common.c
>   Log:
>   Don't search for IPv6 names in apr_sockaddr_info_get() if the
>   application doesn't specify the family (i.e., the application
>   passes in AF_UNSPEC) and APR isn't built with IPv6 support.

Using a --disable-ipv6 build of APR on a glibc 2.1 system, this cut
the cost of a typical DNS lookup from 4 packets sent to the DNS down
to 1 packet sent to the DNS.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: apr/network_io/unix sa_common.c

Posted by Jeff Trawick <tr...@attglobal.net>.
trawick@apache.org writes:

> trawick     01/09/12 12:46:13
> 
>   Modified:    .        CHANGES
>                network_io/unix sa_common.c
>   Log:
>   Don't search for IPv6 names in apr_sockaddr_info_get() if the
>   application doesn't specify the family (i.e., the application
>   passes in AF_UNSPEC) and APR isn't built with IPv6 support.

Using a --disable-ipv6 build of APR on a glibc 2.1 system, this cut
the cost of a typical DNS lookup from 4 packets sent to the DNS down
to 1 packet sent to the DNS.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...