diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-03-19 06:57:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-03-19 06:57:16 +0000 |
commit | b88c4ba11c4d889b0071c39b3d383e897610f9ab (patch) | |
tree | 8a66259a3f6c3ef17ad2bfce484957a261a9eecd /src/or/circuitbuild.c | |
parent | 07a7b6af64483e6d2f863159122b10fd9393601a (diff) | |
download | tor-b88c4ba11c4d889b0071c39b3d383e897610f9ab.tar.gz tor-b88c4ba11c4d889b0071c39b3d383e897610f9ab.zip |
Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
svn:r3786
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 83fc795862..7e01fc3d36 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -858,10 +858,11 @@ router_handles_some_port(routerinfo_t *router, smartlist_t *needed_ports) { uint16_t port; for (i = 0; i < smartlist_len(needed_ports); ++i) { + addr_policy_result_t r; port = *(uint16_t *)smartlist_get(needed_ports, i); tor_assert(port); - if (router_compare_addr_to_addr_policy(0, port, router->exit_policy) != - ADDR_POLICY_REJECTED) + r = router_compare_addr_to_addr_policy(0, port, router->exit_policy); + if (r != ADDR_POLICY_REJECTED && r != ADDR_POLICY_PROBABLY_REJECTED) return 1; } return 0; |