summaryrefslogtreecommitdiff
path: root/src/or/policies.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-31 15:05:56 -0400
committerNick Mathewson <nickm@torproject.org>2016-10-31 15:05:56 -0400
commitd73c671d6d9a60d9318814b7f95ede320e5d58b2 (patch)
tree02d7d57df2312221259e4fd0da3044a050496361 /src/or/policies.h
parentbecc95783979cf1879e6390aad80781d0ce3ea66 (diff)
downloadtor-d73c671d6d9a60d9318814b7f95ede320e5d58b2.tar.gz
tor-d73c671d6d9a60d9318814b7f95ede320e5d58b2.zip
policy_is_reject_star():
ome policies are default-reject, some default-accept. But policy_is_reject_star() assumed they were all default_reject. Fix that! Also, document that policy_is_reject_star() treats a NULL policy as empty. This allows us to simplify the checks in parse_reachable_addresses() by quite a bit. Fxes bug 20306; bugfix on 0.2.8.2-alpha.
Diffstat (limited to 'src/or/policies.h')
-rw-r--r--src/or/policies.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/policies.h b/src/or/policies.h
index e134e686d2..20f58f2beb 100644
--- a/src/or/policies.h
+++ b/src/or/policies.h
@@ -100,7 +100,8 @@ void addr_policy_append_reject_addr_list(smartlist_t **dest,
const smartlist_t *addrs);
void policies_set_node_exitpolicy_to_reject_all(node_t *exitrouter);
int exit_policy_is_general_exit(smartlist_t *policy);
-int policy_is_reject_star(const smartlist_t *policy, sa_family_t family);
+int policy_is_reject_star(const smartlist_t *policy, sa_family_t family,
+ int reject_by_default);
char * policy_dump_to_string(const smartlist_t *policy_list,
int include_ipv4,
int include_ipv6);