]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
<VirtualHost myhost> now applies to all IP addresses for myhost
authorJeff Trawick <trawick@apache.org>
Fri, 11 Jun 2004 19:39:11 +0000 (19:39 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 11 Jun 2004 19:39:11 +0000 (19:39 +0000)
instead of just the first one reported by the resolver.  This
corrects a regression since 1.3.

Submitted by: Jeff Trawick
Reviewed by: stoddard, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103909 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/vhost.c

diff --git a/CHANGES b/CHANGES
index 7e8253ec4869643e78e0e970a22a81cbc485d785..65942590f2d18a30ceb0f1c6b9bc44303df65fdc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.50
 
+  *) <VirtualHost myhost> now applies to all IP addresses for myhost
+     instead of just the first one reported by the resolver.  This
+     corrects a regression since 1.3.  [Jeff Trawick]
+
   *) util_ldap: allow relative paths for LDAPTrustedCA to be resolved
      against ServerRoot PR#26602 [Brad Nicholes]
        
diff --git a/STATUS b/STATUS
index fc3685a1683c6a94cc5e32185c19088ec39bbd5a..19b672819e976a95ccd3c71a9971df22f57b6237 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/06/11 16:15:42 $]
+Last modified at [$Date: 2004/06/11 19:39:10 $]
 
 Release:
 
@@ -72,12 +72,6 @@ PATCHES TO BACKPORT FROM 2.1
   [ please place file names and revisions from HEAD here, so it is easy to
     identify exactly what the proposed changes are! ]
 
-    *) <VirtualHost myhost> now applies to all IP addresses for myhost
-       instead of just the first one reported by the resolver.  This
-       corrects a regression since 1.3.
-         server/vhost.c r1.87
-       +1: trawick, stoddard, jim
-
     *) mod_ssl: Remove some unused functions (after CAN-2004-0488 fix is applied)
        http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_util.c?r1=1.46&r2=1.47
        +1: jorton, nd
index 9fa182bce16fada9062315a8f3351f7b2220cd66..defead9c6c456859e6545506302aaeccee381c26 100644 (file)
@@ -197,15 +197,18 @@ static const char *get_addresses(apr_pool_t *p, const char *w_,
         }
     }
 
-    /* XXX Gotta go through *all* addresses for the host name! 
-     * Fix apr_sockaddr_info_get() to save them! */
-
-    sar = apr_pcalloc(p, sizeof(server_addr_rec));
-    **paddr = sar;
-    *paddr = &sar->next;
-    sar->host_addr = my_addr;
-    sar->host_port = port;
-    sar->virthost = host;
+    /* Remember all addresses for the host */
+
+    do {
+        sar = apr_pcalloc(p, sizeof(server_addr_rec));
+        **paddr = sar;
+        *paddr = &sar->next;
+        sar->host_addr = my_addr;
+        sar->host_port = port;
+        sar->virthost = host;
+        my_addr = my_addr->next;
+    } while (my_addr);
+
     return NULL;
 }