~ubuntu-branches/ubuntu/wily/apache2/wily

« back to all changes in this revision

Viewing changes to srclib/apr/network_io/win32/sockets.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-05-23 10:16:09 UTC
  • mfrom: (14.3.26 sid)
  • Revision ID: james.westby@ubuntu.com-20110523101609-iqqcad6kzo1zc2df
Tags: 2.2.19-1ubuntu1
* Merge from debian unstable (LP: #787013). Remaining changes:
  - debian/{control, rules}: Enable PIE hardening.
  - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
  - debian/control: Add bzr tag and point it to our tree
  - debian/apache2.py, debian/apache2.2-common.install: Add apport hook.
  - debian/control, debian/ask-for-passphrase, debian/config-dir/mods-available/ssl.conf:
    Plymouth aware passphrase dialog program ask-for-passphrase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    sock->protocol = protocol;
52
52
    apr_sockaddr_vars_set(sock->local_addr, family, 0);
53
53
    apr_sockaddr_vars_set(sock->remote_addr, family, 0);
 
54
#if APR_HAVE_IPV6
 
55
    /* hard-coded behavior for older Windows IPv6 */
 
56
    if (apr_os_level < APR_WIN_VISTA && family == AF_INET6) {
 
57
        apr_set_option(sock, APR_IPV6_V6ONLY, 1);
 
58
    }
 
59
#endif
54
60
}                                                                                                  
55
61
static void alloc_socket(apr_socket_t **new, apr_pool_t *p)
56
62
{
81
87
                                            int type, int protocol, 
82
88
                                            apr_pool_t *cont)
83
89
{
 
90
#if APR_HAVE_IPV6
84
91
    int downgrade = (family == AF_UNSPEC);
 
92
#endif
85
93
 
86
94
    if (family == AF_UNSPEC) {
87
95
#if APR_HAVE_IPV6
251
259
    (*new)->remote_addr->salen = sizeof((*new)->remote_addr->sa);
252
260
    memcpy (&(*new)->remote_addr->sa, &sa, salen);
253
261
    *(*new)->local_addr = *sock->local_addr;
 
262
    (*new)->remote_addr_unknown = 0;
254
263
 
255
264
    /* The above assignment just overwrote the pool entry. Setting the local_addr 
256
265
       pool for the accepted socket back to what it should be.  Otherwise all