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
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);
}
}