altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1624349.patch

008793
diff --git a/server/scoreboard.c b/server/scoreboard.c
008793
index bef2b90..c8ef6a3 100644
008793
--- a/server/scoreboard.c
008793
+++ b/server/scoreboard.c
008793
@@ -484,8 +484,14 @@ static int update_child_status_internal(int child_num,
008793
             ws->conn_bytes = 0;
008793
         }
008793
         if (r) {
008793
-            apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config,
008793
-                        REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
008793
+            const char *client = ap_get_remote_host(c, r->per_dir_config,
008793
+                                 REMOTE_NOLOOKUP, NULL);
008793
+            if (!client || !strcmp(client, c->client_ip)) {
008793
+                apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client));
008793
+            }
008793
+            else {
008793
+                apr_cpystrn(ws->client, client, sizeof(ws->client));
008793
+            }
008793
             copy_request(ws->request, sizeof(ws->request), r);
008793
             if (r->server) {
008793
                 apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d",