diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-19 19:40:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-19 19:40:45 +0000 |
commit | 4a240552c4ea837e174f37e04a19fb9f01e03d6d (patch) | |
tree | 7d4a5a17a1d403ed85384e9260767931d3d301c9 /src/or/test.c | |
parent | bbbf50428102156359974e33bbcb70537132ace9 (diff) | |
download | tor-4a240552c4ea837e174f37e04a19fb9f01e03d6d.tar tor-4a240552c4ea837e174f37e04a19fb9f01e03d6d.tar.gz |
r13834@catbus: nickm | 2007-07-19 15:40:42 -0400
Another patch from croup: drop support for address masks that do not correspond to bit prefixes. Nobody has used this for a while, and we have given warnings for a long time.
svn:r10881
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 85726e09f..7ba546ff1 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2095,12 +2095,12 @@ test_dir_format(void) ex1.policy_type = ADDR_POLICY_ACCEPT; ex1.string = NULL; ex1.addr = 0; - ex1.msk = 0; + ex1.maskbits = 0; ex1.prt_min = ex1.prt_max = 80; ex1.next = &ex2; ex2.policy_type = ADDR_POLICY_REJECT; ex2.addr = 18 << 24; - ex2.msk = 0xff000000u; + ex2.maskbits = 8; ex2.prt_min = ex2.prt_max = 24; ex2.next = NULL; r2.address = tor_strdup("1.1.1.1"); @@ -2719,7 +2719,7 @@ test_policies(void) test_eq(ADDR_POLICY_REJECT, policy->policy_type); tor_addr_from_ipv4(&tar, 0xc0a80000u); test_assert(policy->addr == 0xc0a80000u); - test_eq(0xffff0000u, policy->msk); + test_eq(16, policy->maskbits); test_eq(1, policy->prt_min); test_eq(65535, policy->prt_max); test_streq("reject 192.168.0.0/16:*", policy->string); |