From: Jeff Trawick Date: Fri, 11 Jun 2004 19:39:11 +0000 (+0000) Subject: now applies to all IP addresses for myhost X-Git-Tag: 2.0.50~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ac3cb4cd064a97e89266b2103b3ef45328d4a00;p=thirdparty%2Fapache%2Fhttpd.git 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. 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 --- diff --git a/CHANGES b/CHANGES index 7e8253ec486..65942590f2d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.50 + *) 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 fc3685a1683..19b672819e9 100644 --- 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! ] - *) 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 diff --git a/server/vhost.c b/server/vhost.c index 9fa182bce16..defead9c6c4 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; }