summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-14 20:51:41 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-14 23:16:57 -0500
commitbb2145b45ba5992eae6d647b946b430dd2367375 (patch)
tree8f066e05ceeffd528be75899deab8197996693c4 /src/test
parent85e8d35fca49c0a660e104a85bb727f808b8ffb0 (diff)
downloadtor-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.c6
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;