From 02072a0abe59c5f5a8a403f6f0d241a97c280a3f Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 3 Nov 2000 14:48:40 +0000 Subject: [PATCH] Another removal of using raw sockaddr where we should be using APR. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86822 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 20a11e35d2..26c73af5a7 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -658,10 +658,8 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, && conn->remote_host == NULL && (type == REMOTE_DOUBLE_REV || hostname_lookups != HOSTNAME_LOOKUP_OFF)) { - iaddr = &(conn->remote_addr.sin_addr); - hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET); - if (hptr != NULL) { - conn->remote_host = apr_pstrdup(conn->pool, (void *)hptr->h_name); + if (apr_get_remote_hostname(&conn->remote_host, conn->client_socket) + == APR_SUCCESS){ ap_str_tolower(conn->remote_host); if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) { -- 2.50.1