apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Sat, 06 Mar 2004 18:13:11 GMT
jorton      2004/03/06 10:13:11

  Modified:    .        Tag: APR_0_9_BRANCH CHANGES
               network_io/unix Tag: APR_0_9_BRANCH sockaddr.c
  Log:
  Backport from HEAD:
  
  * network_io/sockets/sockaddr.c (call_resolver): Ignore anything other
  than AF_INET and AF_INET6 addresses.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.426.2.9 +6 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.426.2.8
  retrieving revision 1.426.2.9
  diff -w -d -u -r1.426.2.8 -r1.426.2.9
  --- CHANGES	13 Feb 2004 09:33:41 -0000	1.426.2.8
  +++ CHANGES	6 Mar 2004 18:13:11 -0000	1.426.2.9
  @@ -1,5 +1,11 @@
   Changes with APR 0.9.5
   
  +  *) Ensure that apr_sockaddr_info_get() does not return anything
  +     other than AF_INET and AF_INET6 addresses.  [Joe Orton]
  +
  +  *) Clarify that apr_dir_read() does not guarantee order of returned
  +     entries as previously claimed.  [Joe Orton]
  +
     *) The whole codebase was relicensed and is now available under
        the Apache License, Version 2.0 (http://www.apache.org/licenses).
        [Apache Software Foundation]
  
  
  
  No                   revision
  No                   revision
  1.43.2.4  +11 -1     apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.43.2.3
  retrieving revision 1.43.2.4
  diff -w -d -u -r1.43.2.3 -r1.43.2.4
  --- sockaddr.c	13 Feb 2004 09:33:51 -0000	1.43.2.3
  +++ sockaddr.c	6 Mar 2004 18:13:11 -0000	1.43.2.4
  @@ -380,7 +380,17 @@
       prev_sa = NULL;
       ai = ai_list;
       while (ai) { /* while more addresses to report */
  -        apr_sockaddr_t *new_sa = apr_pcalloc(p, sizeof(apr_sockaddr_t));
  +        apr_sockaddr_t *new_sa;
  +
  +        /* Ignore anything bogus: getaddrinfo in some old versions of
  +         * glibc will return AF_UNIX entries for AF_UNSPEC+AI_PASSIVE
  +         * lookups. */
  +        if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) {
  +            ai = ai->ai_next;
  +            continue;
  +        }
  +
  +        new_sa = apr_pcalloc(p, sizeof(apr_sockaddr_t));
   
           new_sa->pool = p;
           memcpy(&new_sa->sa, ai->ai_addr, ai->ai_addrlen);
  
  
  

Mime
View raw message