summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-02-17 08:52:57 +0000
committerNick Mathewson <nickm@torproject.org>2004-02-17 08:52:57 +0000
commit72568d26205225a4ce9386ae56b9fb39631dc3cf (patch)
tree1ca19107472e8605c65ee025ed3cd342694be849
parentbab6c0a3325c029428fbca727e60fac1a1766e5f (diff)
downloadtor-72568d26205225a4ce9386ae56b9fb39631dc3cf.tar.gz
tor-72568d26205225a4ce9386ae56b9fb39631dc3cf.zip
Another case of the same.
svn:r1099
-rw-r--r--src/or/routerlist.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index cc975204e4..bb067f985f 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -426,10 +426,13 @@ int router_compare_addr_to_exit_policy(uint32_t addr, uint16_t port,
}
} else {
/* Address is known */
- if ( (addr & tmpe->msk) == (tmpe->addr & tmpe->msk) &&
- (port >= tmpe->prt_min && port <= tmpe->prt_max) ) {
- /* Exact match for the policy */
- match = 1;
+ if ((addr & tmpe->msk) == (tmpe->addr & tmpe->msk)) {
+ if (port >= tmpe->prt_min && port <= tmpe->prt_max) {
+ /* Exact match for the policy */
+ match = 1;
+ } else if (!port) {
+ maybe = 1;
+ }
}
}
if (maybe) {