[nginx] Mail: fixed the duplicate listen address detection.

Ruslan Ermilov ru at nginx.com
Wed Feb 11 12:51:52 UTC 2015


details:   http://hg.nginx.org/nginx/rev/b2920b517490
branches:  
changeset: 5979:b2920b517490
user:      Ruslan Ermilov <ru at nginx.com>
date:      Fri Jan 23 15:23:29 2015 +0300
description:
Mail: fixed the duplicate listen address detection.

diffstat:

 src/mail/ngx_mail_core_module.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r eb4ba3800c31 -r b2920b517490 src/mail/ngx_mail_core_module.c
--- a/src/mail/ngx_mail_core_module.c	Fri Jan 23 15:23:27 2015 +0300
+++ b/src/mail/ngx_mail_core_module.c	Fri Jan 23 15:23:29 2015 +0300
@@ -336,7 +336,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx
             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
             off = offsetof(struct sockaddr_in, sin_addr);
             len = 4;
             sin = (struct sockaddr_in *) sa;
-            port = sin->sin_port;
+            port = ntohs(sin->sin_port);
             break;
         }
 



More information about the nginx-devel mailing list