Fix bug 1113.

Bridges do not use the default exit policy, but reject *:* by default.
This commit is contained in:
Karsten Loesing
2009-10-27 01:03:41 -07:00
parent 8c34e79263
commit 56c2385157
5 changed files with 18 additions and 10 deletions
+3 -3
View File
@@ -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 *:*");