aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-20 03:40:54 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-20 03:40:54 +0000
commit19f04ae9c3f716d15fe55c373a5db454e5870d27 (patch)
tree91f62844599165978d0ab86ed671fa77c7324a93
parentba49b45682a1979d81a1dbb1425c784af4aae6ef (diff)
downloadtor-19f04ae9c3f716d15fe55c373a5db454e5870d27.tar
tor-19f04ae9c3f716d15fe55c373a5db454e5870d27.tar.gz
make router_is_general_exit match its documentation
but it's still wrong maybe svn:r5095
-rw-r--r--src/or/dirserv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ee9fc3998..db79102d8 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1095,7 +1095,7 @@ static int
router_is_general_exit(routerinfo_t *ri)
{
static const int ports[] = { 80, 443, 6667 };
- int n_allowed = 3;
+ int n_allowed = 0;
int i;
for (i = 0; i < 3; ++i) {
struct addr_policy_t *policy = ri->exit_policy;
@@ -1107,8 +1107,8 @@ router_is_general_exit(routerinfo_t *ri)
if ((policy->addr & 0xff000000ul) == 0x7f000000ul)
continue; /* 127.x */
/* We have a match that is at least a /8. */
- if (policy->policy_type != ADDR_POLICY_ACCEPT)
- --n_allowed;
+ if (policy->policy_type == ADDR_POLICY_ACCEPT)
+ ++n_allowed;
break;
}
}