diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-08-17 05:08:42 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-08-17 05:08:42 +0000 |
commit | f12c7563e2523e268075bb1acc254ea30d536840 (patch) | |
tree | dcd6ec78e2296b3475a3849317d95eb587c7169e /src/mail/ngx_mail.c | |
parent | 5425263436c761bf310d1ccb3dd756740c0ff69d (diff) | |
download | nginx-f12c7563e2523e268075bb1acc254ea30d536840.tar.gz nginx-f12c7563e2523e268075bb1acc254ea30d536840.zip |
Mail: fixed sorting of listen addresses (ticket #187).
For http module this problem was already fixed in r4756.
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r-- | src/mail/ngx_mail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c index 49ec2e05b..b097778db 100644 --- a/src/mail/ngx_mail.c +++ b/src/mail/ngx_mail.c @@ -539,6 +539,11 @@ ngx_mail_cmp_conf_addrs(const void *one, const void *two) return 1; } + if (second->wildcard) { + /* a wildcard must be the last resort, shift it to the end */ + return -1; + } + if (first->bind && !second->bind) { /* shift explicit bind()ed addresses to the start */ return -1; |