diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-14 20:51:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:57 -0500 |
commit | bb2145b45ba5992eae6d647b946b430dd2367375 (patch) | |
tree | 8f066e05ceeffd528be75899deab8197996693c4 /src/test | |
parent | 85e8d35fca49c0a660e104a85bb727f808b8ffb0 (diff) | |
download | tor-bb2145b45ba5992eae6d647b946b430dd2367375.tar.gz tor-bb2145b45ba5992eae6d647b946b430dd2367375.zip |
Fix a bug in policy_is_reject_star() that was making IPv4 exits break
IPv4-only exits have an implicit "reject [::]/0", which was making
policy_is_reject_star() return 1 for them, making us refuse to do
hostname lookups.
This fix chanes policy_is_reject_star() to ask about which family we meant.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test.c b/src/test/test.c index d70f255106..c96aeb7053 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -1176,9 +1176,9 @@ test_policies(void) test_assert(!cmp_addr_policies(policy2, policy2)); test_assert(!cmp_addr_policies(NULL, NULL)); - test_assert(!policy_is_reject_star(policy2)); - test_assert(policy_is_reject_star(policy)); - test_assert(policy_is_reject_star(NULL)); + test_assert(!policy_is_reject_star(policy2, AF_INET)); + test_assert(policy_is_reject_star(policy, AF_INET)); + test_assert(policy_is_reject_star(NULL, AF_INET)); addr_policy_list_free(policy); policy = NULL; |