dovecot-1.2: net_listen(): If IPv6 isn't supported, don't fallba...

dovecot at dovecot.org dovecot at dovecot.org
Mon Dec 13 15:40:40 EET 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/84373d238073
changeset: 9637:84373d238073
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 fa6772b19795 -r 84373d238073 src/lib/network.c
--- a/src/lib/network.c	Mon Dec 13 13:29:55 2010 +0000
+++ b/src/lib/network.c	Mon Dec 13 13:40:27 2010 +0000
@@ -302,7 +302,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