diff options
author | Jeff Trawick <trawick@apache.org> | 2004-06-11 15:44:14 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2004-06-11 15:44:14 +0200 |
commit | 77ed5d99b1c574f6695dbef0940c0f08bf889286 (patch) | |
tree | ca35a50c0e1301ba80d40e5f2b2c0e6fe3389155 /server/vhost.c | |
parent | Slightly augment the example for SSIStartTag (diff) | |
download | apache2-77ed5d99b1c574f6695dbef0940c0f08bf889286.tar.xz apache2-77ed5d99b1c574f6695dbef0940c0f08bf889286.zip |
<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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103897 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r-- | server/vhost.c | 21 |
1 files changed, 12 insertions, 9 deletions
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; } |