You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/12/03 00:53:38 UTC

cvs commit: httpd-2.0/server listen.c

trawick     2002/12/02 15:53:38

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES
               server   Tag: APACHE_2_0_BRANCH listen.c
  Log:
  Pick up fix from 2.1:
  
  Fix critical bug in new --enable-v4-mapped configure option
  implementation which broke IPv4 listening sockets on some
  systems.
  
  Submitted by:	hiroyuki hanai <ha...@imgsrc.co.jp>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.988.2.7 +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.6
  retrieving revision 1.988.2.7
  diff -u -r1.988.2.6 -r1.988.2.7
  --- CHANGES	30 Nov 2002 21:45:31 -0000	1.988.2.6
  +++ CHANGES	2 Dec 2002 23:53:37 -0000	1.988.2.7
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.44
   
  +  *) Fix critical bug in new --enable-v4-mapped configure option
  +     implementation which broke IPv4 listening sockets on some
  +     systems.  [hiroyuki hanai <ha...@imgsrc.co.jp>]
  +
     *) mod_setenvif: Fix BrowserMatchNoCase support for non-regex
        patterns [Andr� Malo <nd...@perlig.de>]
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.83.2.1  +10 -8     httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.83
  retrieving revision 1.83.2.1
  diff -u -r1.83 -r1.83.2.1
  --- listen.c	14 Nov 2002 14:17:11 -0000	1.83
  +++ listen.c	2 Dec 2002 23:53:37 -0000	1.83.2.1
  @@ -118,14 +118,16 @@
       }
   
   #if APR_HAVE_IPV6
  -    stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting);
  -    if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
  -        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
  -                      "make_sock: for address %pI, apr_socket_opt_set: "
  -                      "(IPV6_V6ONLY)",
  -                      server->bind_addr);
  -        apr_socket_close(s);
  -        return stat;
  +    if (server->bind_addr->family == APR_INET6) {
  +        stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting);
  +        if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
  +            ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
  +                          "make_sock: for address %pI, apr_socket_opt_set: "
  +                          "(IPV6_V6ONLY)",
  +                          server->bind_addr);
  +            apr_socket_close(s);
  +            return stat;
  +        }
       }
   #endif