diff options
author | Eric Covener <covener@apache.org> | 2013-09-20 15:36:33 +0200 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2013-09-20 15:36:33 +0200 |
commit | f889cb92be0339ea75eebff0b97dce73372d6260 (patch) | |
tree | b05a4bd96f861e3643b1858fc6e299bf30ad5b51 | |
parent | typo (diff) | |
download | apache2-f889cb92be0339ea75eebff0b97dce73372d6260.tar.xz apache2-f889cb92be0339ea75eebff0b97dce73372d6260.zip |
name-based vhosts listed twice with apachectl -S
When processing a vhost with * or _default_, we'd add the "names" once
for 0.0.0.0 and once for [::], but these are stored in the same "default"
ip chain. Catch the back-to-back wildcard + same port and short-circuit the
second add.
Submitted By: rjung
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525000 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | server/vhost.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/vhost.c b/server/vhost.c index 2aadc3efbd..eab2e194c1 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -587,7 +587,8 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s) ic = find_default_server(sar->host_port); if (ic && sar->host_port == ic->sar->host_port) { /* we're a match for an existing "default server" */ - if (!sar_prev || memcmp(sar_prev->host_addr->ipaddr_ptr, inaddr_any, sar_prev->host_addr->ipaddr_len)) { + if (!sar_prev || memcmp(sar_prev->host_addr->ipaddr_ptr, inaddr_any, sar_prev->host_addr->ipaddr_len) + || sar_prev->host_port != sar->host_port) { add_name_vhost_config(p, main_s, s, sar, ic); } } |