mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
#220: wip fix add wildcard server to all addr
This commit is contained in:
parent
f45c2707ea
commit
ff99d98f9a
@ -1252,14 +1252,15 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
|
||||
|
||||
addr = port->addrs.elts;
|
||||
|
||||
for (i = 0; i < port->addrs.nelts; i++) {
|
||||
ngx_int_t exact_match = 1;
|
||||
|
||||
if (ngx_cmp_sockaddr(lsopt->sockaddr, lsopt->socklen,
|
||||
addr[i].opt.sockaddr,
|
||||
addr[i].opt.socklen, 0)
|
||||
!= NGX_OK)
|
||||
{
|
||||
continue;
|
||||
for (i = 0; i < port->addrs.nelts; i++) {
|
||||
if ( ngx_cmp_sockaddr(lsopt->sockaddr, lsopt->socklen, addr[i].opt.sockaddr, addr[i].opt.socklen, 0) != NGX_OK ) {
|
||||
if( !lsopt->wildcard ){
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
exact_match = NGX_OK;
|
||||
}
|
||||
|
||||
/* the address is already in the address list */
|
||||
@ -1379,6 +1380,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
|
||||
addr[i].opt.quic = quic;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if ( exact_match == NGX_OK ){
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user