mirror of
https://github.com/apache/httpd.git
synced 2025-08-10 02:56:11 +00:00
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
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user