From 61722638ea75ebced8ae4529c137074e538551bf Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 26 Dec 2008 20:37:18 +0000 Subject: Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0. svn:r17788 --- src/or/test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/or/test.c') diff --git a/src/or/test.c b/src/or/test.c index 3b022f7f22..4ca72633aa 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -1630,9 +1630,9 @@ test_util_ip6_helpers(void) /* tor_addr_compare(tor_addr_t x2) */ test_addr_compare("ffff::", ==, "ffff::0"); - test_addr_compare("0::3:2:1", >, "0::ffff:0.3.2.1"); - test_addr_compare("0::2:2:1", >, "0::ffff:0.3.2.1"); - test_addr_compare("0::ffff:0.3.2.1", <, "0::0:0:0"); + test_addr_compare("0::3:2:1", <, "0::ffff:0.3.2.1"); + test_addr_compare("0::2:2:1", <, "0::ffff:0.3.2.1"); + test_addr_compare("0::ffff:0.3.2.1", >, "0::0:0:0"); test_addr_compare("0::ffff:5.2.2.1", <, "::ffff:6.0.0.0"); /* XXXX wrong. */ tor_addr_parse_mask_ports("[::ffff:2.3.4.5]", &t1, NULL, NULL, NULL); tor_addr_parse_mask_ports("2.3.4.5", &t2, NULL, NULL, NULL); -- cgit v1.2.3-54-g00ecf