dovecot-1.1: net_is_in_network(): Added IPv6 unit tests
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 15 08:31:48 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/4ba3de34eaa4
changeset: 7519:4ba3de34eaa4
user: Timo Sirainen <tss at iki.fi>
date: Thu May 15 08:31:20 2008 +0300
description:
net_is_in_network(): Added IPv6 unit tests
diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
src/tests/test-lib.c | 10 +++++++++-
diffs (20 lines):
diff -r 45a4fe590389 -r 4ba3de34eaa4 src/tests/test-lib.c
--- a/src/tests/test-lib.c Thu May 15 07:53:11 2008 +0300
+++ b/src/tests/test-lib.c Thu May 15 08:31:20 2008 +0300
@@ -388,7 +388,15 @@ static void test_net_is_in_network(void)
{ "1.2.3.255", "1.2.3.254", 31, TRUE },
{ "1.2.3.255", "1.2.3.0", 24, TRUE },
{ "1.2.255.255", "1.2.254.0", 23, TRUE },
- { "255.255.255.255", "128.0.0.0", 1, TRUE }
+ { "255.255.255.255", "128.0.0.0", 1, TRUE },
+ { "255.255.255.255", "127.0.0.0", 1, FALSE }
+#ifdef HAVE_IPV6
+ ,
+ { "1234:5678::abcf", "1234:5678::abce", 127, TRUE },
+ { "1234:5678::abcd", "1234:5678::abce", 127, FALSE },
+ { "123e::ffff", "123e::0", 15, TRUE },
+ { "123d::ffff", "123e::0", 15, FALSE }
+#endif
};
struct ip_addr ip, net_ip;
unsigned int i;
More information about the dovecot-cvs
mailing list