diff options
author | Ruslan Ermilov <ru@nginx.com> | 2015-01-23 15:23:29 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2015-01-23 15:23:29 +0300 |
commit | 2b7e167dbb59a6d1152c644080e21782b8b675e3 (patch) | |
tree | 85daaed598c7c517127fd3ba2b0ba421cd30c93a /src/mail/ngx_mail_core_module.c | |
parent | 0b30dec0d3d753ee206af271e7c83ff6799766bc (diff) | |
download | nginx-2b7e167dbb59a6d1152c644080e21782b8b675e3.tar.gz nginx-2b7e167dbb59a6d1152c644080e21782b8b675e3.zip |
Mail: fixed the duplicate listen address detection.
Diffstat (limited to 'src/mail/ngx_mail_core_module.c')
-rw-r--r-- | src/mail/ngx_mail_core_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mail/ngx_mail_core_module.c b/src/mail/ngx_mail_core_module.c index a5388c847..05a47f5e3 100644 --- a/src/mail/ngx_mail_core_module.c +++ b/src/mail/ngx_mail_core_module.c @@ -336,7 +336,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) off = offsetof(struct sockaddr_in6, sin6_addr); len = 16; sin6 = (struct sockaddr_in6 *) sa; - port = sin6->sin6_port; + port = ntohs(sin6->sin6_port); break; #endif @@ -352,7 +352,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) off = offsetof(struct sockaddr_in, sin_addr); len = 4; sin = (struct sockaddr_in *) sa; - port = sin->sin_port; + port = ntohs(sin->sin_port); break; } |