summaryrefslogtreecommitdiffstats
path: root/server/vhost.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2001-12-26 22:25:54 +0100
committerJeff Trawick <trawick@apache.org>2001-12-26 22:25:54 +0100
commiteb6c5908dbd6c79a46108812c355b664a233d9d1 (patch)
tree13b414c11a12b16c0412e4eaff04028476303eb5 /server/vhost.c
parentThere's snow on the ground! It's cold. It's windy. Must be Michigan!! (diff)
downloadapache2-eb6c5908dbd6c79a46108812c355b664a233d9d1.tar.xz
apache2-eb6c5908dbd6c79a46108812c355b664a233d9d1.zip
use a new APR function to perform socket address comparison so
that we don't have to handle v4-mapped IPv6 addresses here git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r--server/vhost.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/server/vhost.c b/server/vhost.c
index 92da4bd310..6fae3dbc79 100644
--- a/server/vhost.c
+++ b/server/vhost.c
@@ -414,28 +414,14 @@ static APR_INLINE ipaddr_chain *find_ipaddr(apr_sockaddr_t *sa)
if (cur->sa.sin.sin_port == 0 ||
sa->sa.sin.sin_port == 0 ||
cur->sa.sin.sin_port == sa->sa.sin.sin_port) {
- if (cur->ipaddr_len == sa->ipaddr_len &&
- !memcmp(cur->ipaddr_ptr,
- sa->ipaddr_ptr,
- sa->ipaddr_len)) {
+ if (apr_sockaddr_equal(cur, sa)) {
return trav;
}
-#if APR_HAVE_IPV6
- else if (cur->sa.sin.sin_family == AF_INET &&
- sa->sa.sin.sin_family == AF_INET6 &&
- IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sa->ipaddr_ptr) &&
- !memcmp(&((struct in6_addr *)sa->ipaddr_ptr)->s6_addr[12],
- cur->ipaddr_ptr,
- 4)) {
- return trav;
- }
-#endif
}
}
return NULL;
}
-
static ipaddr_chain *find_default_server(apr_port_t port)
{
server_addr_rec *sar;