diff options
author | Vladimir Homutov <vl@nginx.com> | 2013-07-11 16:07:25 +0400 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2013-07-11 16:07:25 +0400 |
commit | af18946d769296d9efead825a0d1aa6a1a41fe74 (patch) | |
tree | 6b34cebcacea394e0126bcff647a3e73ab25c36d /src/http/ngx_http_core_module.c | |
parent | 050f74b751c10eeb2491ec6509d0508a7e690209 (diff) | |
download | nginx-af18946d769296d9efead825a0d1aa6a1a41fe74.tar.gz nginx-af18946d769296d9efead825a0d1aa6a1a41fe74.zip |
Core: extended ngx_sock_ntop() with socklen parameter.
On Linux, sockaddr length is required to process unix socket addresses properly
due to unnamed sockets (which don't have sun_path set at all) and abstract
namespace sockets.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index b32a8842c..5163bee4c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3033,7 +3033,7 @@ ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) #endif lsopt.wildcard = 1; - (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr, + (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.socklen, lsopt.addr, NGX_SOCKADDR_STRLEN, 1); if (ngx_http_add_listen(cf, cscf, &lsopt) != NGX_OK) { @@ -3984,7 +3984,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) lsopt.ipv6only = 1; #endif - (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr, + (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.socklen, lsopt.addr, NGX_SOCKADDR_STRLEN, 1); for (n = 2; n < cf->args->nelts; n++) { |