dovecot-2.2: imap IDLE: Add also fc00::/7 (RFC 4193) to private ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 24 02:23:14 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/dc58905b5c9c
changeset: 14956:dc58905b5c9c
user:      Pascal Volk <user at localhost.localdomain.org>
date:      Thu Aug 23 23:20:57 2012 +0000
description:
imap IDLE: Add also fc00::/7 (RFC 4193) to private networks.

diffstat:

 src/imap/cmd-idle.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 725a91613107 -r dc58905b5c9c src/imap/cmd-idle.c
--- a/src/imap/cmd-idle.c	Thu Aug 23 23:50:55 2012 +0300
+++ b/src/imap/cmd-idle.c	Thu Aug 23 23:20:57 2012 +0000
@@ -178,6 +178,14 @@
 		if (addr >= 2130706432 && addr <= 2147483647)
 			return FALSE; /* 127/8 */
 	}
+#ifdef HAVE_IPV6
+	else if (ip->family == AF_INET6) {
+		addr = ip->u.ip6.s6_addr;
+		if (addr >= 334965454937798799971759379190646833152ULL &&
+		    addr <= 337623910929368631717566993311207522303ULL)
+			return FALSE; /* fc00::/7 */
+	}
+#endif
 	return TRUE;
 }
 


More information about the dovecot-cvs mailing list