From: Jeff Trawick Date: Fri, 11 Jun 2004 13:44:14 +0000 (+0000) Subject: now applies to all IP addresses for myhost X-Git-Tag: pre_ajp_proxy~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77ed5d99b1c574f6695dbef0940c0f08bf889286;p=apache 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 --- diff --git a/CHANGES b/CHANGES index 7c6ea61a69..9387fe33e1 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) 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] + *) now recognizes the module identifier in addition to the file name. PR 29003. [Edward Rudd , 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; }