-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_proxy_fdpass: Fix computation of the size of 'struct sockaddr_un'
+ when passed to 'connec()'.
+ [Graham Dumpleton <grahamd apache org>]
+
*) mod_socache_shmcb: Correct counting of expirations for status display.
Expirations happening during retrieval were not counted. [Rainer Jung]
}
/* TODO: In APR 2.x: Extend apr_sockaddr_t to possibly be a path !!! */
+/* XXX: The same function exists in proxy_util.c */
static apr_status_t socket_connect_un(apr_socket_t *sock,
struct sockaddr_un *sa)
{
}
do {
- rv = connect(rawsock, (struct sockaddr*)sa,
- sizeof(*sa) + strlen(sa->sun_path));
+ const socklen_t addrlen = APR_OFFSETOF(struct sockaddr_un, sun_path)
+ + strlen(sa->sun_path) + 1;
+ rv = connect(rawsock, (struct sockaddr*)sa, addrlen);
} while (rv == -1 && errno == EINTR);
if ((rv == -1) && (errno == EINPROGRESS || errno == EALREADY)