diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-26 20:37:18 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-26 20:37:18 +0000 |
commit | 61722638ea75ebced8ae4529c137074e538551bf (patch) | |
tree | 90eee39b9bd028ac15b83515336fd28528ce529b /src/or/test.c | |
parent | f182e9707f831b24aeb12785746f5163780163ec (diff) | |
download | tor-61722638ea75ebced8ae4529c137074e538551bf.tar.gz tor-61722638ea75ebced8ae4529c137074e538551bf.zip |
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
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |