dovecot-2.0: net_listen(): If IPv6 isn't supported, don't fallba...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Dec 13 15:40:31 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/cde0d403c6ff
changeset: 12525:cde0d403c6ff
user: Timo Sirainen <tss at iki.fi>
date: Mon Dec 13 13:40:27 2010 +0000
description:
net_listen(): If IPv6 isn't supported, don't fallback to IPv4 if my_ip is given.
diffstat:
src/lib/network.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r f3d42a99ce44 -r cde0d403c6ff src/lib/network.c
--- a/src/lib/network.c Mon Dec 13 13:27:18 2010 +0000
+++ b/src/lib/network.c Mon Dec 13 13:40:27 2010 +0000
@@ -371,7 +371,8 @@
/* create the socket */
fd = socket(so.sin.sin_family, SOCK_STREAM, 0);
#ifdef HAVE_IPV6
- if (fd == -1 && (errno == EINVAL || errno == EAFNOSUPPORT)) {
+ if (fd == -1 && my_ip == NULL &&
+ (errno == EINVAL || errno == EAFNOSUPPORT)) {
/* IPv6 is not supported by OS */
so.sin.sin_family = AF_INET;
so.sin.sin_addr.s_addr = INADDR_ANY;
More information about the dovecot-cvs
mailing list