diff src/mail/ngx_mail_core_module.c @ 5263:05ba5bce31e0

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.
author Vladimir Homutov <vl@nginx.com>
date Thu, 11 Jul 2013 16:07:25 +0400
parents cf3e9e6a7624
children bb26f7ceaaf1
line wrap: on
line diff
--- a/src/mail/ngx_mail_core_module.c
+++ b/src/mail/ngx_mail_core_module.c
@@ -439,7 +439,8 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx
                 ls->bind = 1;
 
             } else {
-                len = ngx_sock_ntop(sa, buf, NGX_SOCKADDR_STRLEN, 1);
+                len = ngx_sock_ntop(sa, ls->socklen, buf,
+                                    NGX_SOCKADDR_STRLEN, 1);
 
                 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                    "ipv6only is not supported "