apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/network_io/win32 sockopt.c
Date Sat, 03 Apr 2004 17:22:06 GMT
jerenkrantz    2004/04/03 09:22:06

  Modified:    .        Tag: APR_0_9_BRANCH CHANGES
               network_io/unix Tag: APR_0_9_BRANCH sockopt.c
               network_io/win32 Tag: APR_0_9_BRANCH sockopt.c
  Log:
  APR 1.0 Backport: network/unix/sockopt.c r1.79, network/win32/sockopt.c r1.59
  
  Even if we do not check the value of APR_IPV6_V6ONLY before setting, we still
  must set the option cache if we're setting APR_IPV6_V6ONLY.  Otherwise,
  later apr_socket_opt_get calls will fail.
  
  This fixes Listen directives on IPv6 machines where IPV6_V6ONLY may be
  enabled (i.e. FreeBSD 5.x, OpenBSD, NetBSD) where it would not properly
  bind to the IPv4 socket.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.426.2.14 +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.426.2.13
  retrieving revision 1.426.2.14
  diff -u -u -r1.426.2.13 -r1.426.2.14
  --- CHANGES	25 Mar 2004 22:29:35 -0000	1.426.2.13
  +++ CHANGES	3 Apr 2004 17:22:06 -0000	1.426.2.14
  @@ -1,5 +1,9 @@
   Changes with APR 0.9.5
   
  +  *) Fix apr_socket_opt_set with APR_IPV6_V6ONLY flag.  Fixes httpd
  +     Listen IPv6 socket behavior on FreeBSD 5.x, OpenBSD, NetBSD.
  +     [Justin Erenkrantz]
  +
     *) Fix apr_time_exp_get() for dates in 2038.  
        [Philip Martin <philip codematters.co.uk>]
   
  
  
  
  No                   revision
  No                   revision
  1.70.2.6  +2 -1      apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.70.2.5
  retrieving revision 1.70.2.6
  diff -u -u -r1.70.2.5 -r1.70.2.6
  --- sockopt.c	27 Feb 2004 15:05:15 -0000	1.70.2.5
  +++ sockopt.c	3 Apr 2004 17:22:06 -0000	1.70.2.6
  @@ -288,13 +288,14 @@
       case APR_IPV6_V6ONLY:
   #if APR_HAVE_IPV6 && defined(IPV6_V6ONLY)
           /* we don't know the initial setting of this option,
  -         * so don't check/set sock->netmask since that optimization
  +         * so don't check sock->netmask since that optimization
            * won't work
            */
           if (setsockopt(sock->socketdes, IPPROTO_IPV6, IPV6_V6ONLY,
                          (void *)&on, sizeof(int)) == -1) {
               return errno;
           }
  +        apr_set_option(sock, APR_IPV6_V6ONLY, on);
   #else
           return APR_ENOTIMPL;
   #endif
  
  
  
  No                   revision
  No                   revision
  1.52.2.3  +2 -1      apr/network_io/win32/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockopt.c,v
  retrieving revision 1.52.2.2
  retrieving revision 1.52.2.3
  diff -u -u -r1.52.2.2 -r1.52.2.3
  --- sockopt.c	13 Feb 2004 09:33:51 -0000	1.52.2.2
  +++ sockopt.c	3 Apr 2004 17:22:06 -0000	1.52.2.3
  @@ -174,13 +174,14 @@
       case APR_IPV6_V6ONLY:
   #if APR_HAVE_IPV6 && defined(IPV6_V6ONLY)
           /* we don't know the initial setting of this option,
  -         * so don't check/set sock->netmask since that optimization
  +         * so don't check sock->netmask since that optimization
            * won't work
            */
           if (setsockopt(sock->socketdes, IPPROTO_IPV6, IPV6_V6ONLY,
                          (void *)&on, sizeof(int)) == -1) {
               return apr_get_netos_error();
           }
  +        apr_set_option(&sock->netmask, APR_IPV6_V6ONLY, on);
   #else
           return APR_ENOTIMPL;
   #endif
  
  
  

Mime
View raw message