Latest update - 8999
This commit is contained in:
@@ -3964,7 +3964,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
|
||||
ngx_str_t *value, size;
|
||||
ngx_url_t u;
|
||||
ngx_uint_t n;
|
||||
ngx_uint_t n, i;
|
||||
ngx_http_listen_opt_t lsopt;
|
||||
|
||||
cscf->listen = 1;
|
||||
@@ -4310,6 +4310,16 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
#endif
|
||||
|
||||
for (n = 0; n < u.naddrs; n++) {
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (ngx_cmp_sockaddr(u.addrs[n].sockaddr, u.addrs[n].socklen,
|
||||
u.addrs[i].sockaddr, u.addrs[i].socklen, 0)
|
||||
== NGX_OK)
|
||||
{
|
||||
goto next;
|
||||
}
|
||||
}
|
||||
|
||||
lsopt.sockaddr = u.addrs[n].sockaddr;
|
||||
lsopt.socklen = u.addrs[n].socklen;
|
||||
lsopt.addr_text = u.addrs[n].name;
|
||||
@@ -4318,6 +4328,9 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
if (ngx_http_add_listen(cf, cscf, &lsopt) != NGX_OK) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
next:
|
||||
continue;
|
||||
}
|
||||
|
||||
return NGX_CONF_OK;
|
||||
|
||||
Reference in New Issue
Block a user