summaryrefslogtreecommitdiffhomepage
path: root/src/mail/ngx_mail.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mail/ngx_mail.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c
index 49ec2e05b..3812e1517 100644
--- a/src/mail/ngx_mail.c
+++ b/src/mail/ngx_mail.c
@@ -263,6 +263,12 @@ ngx_mail_add_ports(ngx_conf_t *cf, ngx_array_t *ports,
break;
#endif
+#if (NGX_HAVE_UNIX_DOMAIN)
+ case AF_UNIX:
+ p = 0;
+ break;
+#endif
+
default: /* AF_INET */
sin = (struct sockaddr_in *) sa;
p = sin->sin_port;
@@ -539,6 +545,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;