diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-14 20:51:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:57 -0500 |
commit | bb2145b45ba5992eae6d647b946b430dd2367375 (patch) | |
tree | 8f066e05ceeffd528be75899deab8197996693c4 /src/or/router.c | |
parent | 85e8d35fca49c0a660e104a85bb727f808b8ffb0 (diff) | |
download | tor-bb2145b45ba5992eae6d647b946b430dd2367375.tar.gz tor-bb2145b45ba5992eae6d647b946b430dd2367375.zip |
Fix a bug in policy_is_reject_star() that was making IPv4 exits break
IPv4-only exits have an implicit "reject [::]/0", which was making
policy_is_reject_star() return 1 for them, making us refuse to do
hostname lookups.
This fix chanes policy_is_reject_star() to ask about which family we meant.
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c index f51b74e112..d5ffb36fd2 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1621,7 +1621,8 @@ router_rebuild_descriptor(int force) ri->address, !options->BridgeRelay); } ri->policy_is_reject_star = - policy_is_reject_star(ri->exit_policy); + policy_is_reject_star(ri->exit_policy, AF_INET) && + policy_is_reject_star(ri->exit_policy, AF_INET6); if (options->IPv6Exit) { char *p_tmp = policy_summarize(ri->exit_policy, AF_INET6); |