mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix bug 1113.
Bridges do not use the default exit policy, but reject *:* by default.
This commit is contained in:
+3
-3
@@ -629,7 +629,7 @@ test_policy_summary_helper(const char *policy_str,
|
||||
line.value = (char *)policy_str;
|
||||
line.next = NULL;
|
||||
|
||||
r = policies_parse_exit_policy(&line, &policy, 0, NULL);
|
||||
r = policies_parse_exit_policy(&line, &policy, 0, NULL, 1);
|
||||
test_eq(r, 0);
|
||||
summary = policy_summarize(policy);
|
||||
|
||||
@@ -675,7 +675,7 @@ test_policies(void)
|
||||
compare_addr_to_addr_policy(0xc0a80102, 2, policy));
|
||||
|
||||
policy2 = NULL;
|
||||
test_assert(0 == policies_parse_exit_policy(NULL, &policy2, 1, NULL));
|
||||
test_assert(0 == policies_parse_exit_policy(NULL, &policy2, 1, NULL, 1));
|
||||
test_assert(policy2);
|
||||
|
||||
test_assert(!exit_policy_is_general_exit(policy));
|
||||
@@ -699,7 +699,7 @@ test_policies(void)
|
||||
line.key = (char*)"foo";
|
||||
line.value = (char*)"accept *:80,reject private:*,reject *:*";
|
||||
line.next = NULL;
|
||||
test_assert(0 == policies_parse_exit_policy(&line, &policy, 0, NULL));
|
||||
test_assert(0 == policies_parse_exit_policy(&line, &policy, 0, NULL, 1));
|
||||
test_assert(policy);
|
||||
//test_streq(policy->string, "accept *:80");
|
||||
//test_streq(policy->next->string, "reject *:*");
|
||||
|
||||
Reference in New Issue
Block a user