diff options
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | server/vhost.c | 21 |
2 files changed, 16 insertions, 9 deletions
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) <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] + *) <IfModule> now recognizes the module identifier in addition to the file name. PR 29003. [Edward Rudd <eddie omegaware.com>, André Malo] diff --git a/server/vhost.c b/server/vhost.c index 9ea6782296..86119e4834 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -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; } |