diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-08-17 05:21:28 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-08-17 05:21:28 +0000 |
commit | 53b8514f2d1b6a5616344cd12ab7898f1e3e6747 (patch) | |
tree | 5561f9e992d3e10353301ab5074c7a3f6b875c5b /src/mail/ngx_mail_core_module.c | |
parent | ff3236e7a7e1c54cdef1e3300eda2b916807e67a (diff) | |
download | nginx-53b8514f2d1b6a5616344cd12ab7898f1e3e6747.tar.gz nginx-53b8514f2d1b6a5616344cd12ab7898f1e3e6747.zip |
Mail: fixed handling of AF_UNIX addresses in "listen".
This makes AF_UNIX addresses in mail officially supported.
Diffstat (limited to 'src/mail/ngx_mail_core_module.c')
-rw-r--r-- | src/mail/ngx_mail_core_module.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mail/ngx_mail_core_module.c b/src/mail/ngx_mail_core_module.c index ecb722994..86d0b3bee 100644 --- a/src/mail/ngx_mail_core_module.c +++ b/src/mail/ngx_mail_core_module.c @@ -340,6 +340,14 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) break; #endif +#if (NGX_HAVE_UNIX_DOMAIN) + case AF_UNIX: + off = offsetof(struct sockaddr_un, sun_path); + len = sizeof(((struct sockaddr_un *) sa)->sun_path); + port = 0; + break; +#endif + default: /* AF_INET */ off = offsetof(struct sockaddr_in, sin_addr); len = 4; |