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/routerparse.c | |
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/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 93484660d2..a78d1ee53e 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2206,7 +2206,7 @@ router_parse_entry_from_string(const char *s, const char *end, } } - if (policy_is_reject_star(router->exit_policy, AF_INET) && + if (policy_is_reject_star(router->exit_policy, AF_INET, 1) && (!router->ipv6_exit_policy || short_policy_is_reject_star(router->ipv6_exit_policy))) router->policy_is_reject_star = 1; |