diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-31 15:05:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-31 15:05:56 -0400 |
commit | d73c671d6d9a60d9318814b7f95ede320e5d58b2 (patch) | |
tree | 02d7d57df2312221259e4fd0da3044a050496361 /src/or/policies.h | |
parent | becc95783979cf1879e6390aad80781d0ce3ea66 (diff) | |
download | tor-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.h | 3 |
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); |