summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-06-12 22:02:33 +0000
committerPeter Palfrader <peter@palfrader.org>2006-06-12 22:02:33 +0000
commit5c9779f47b4197f658abd131f7fda6b09f4526a0 (patch)
tree15ed1a7b5b37ba44ab6d942fe147281d0fdacee5 /src/or
parent0eedbac975c331926e6fffda9e0f04b684b058c7 (diff)
downloadtor-5c9779f47b4197f658abd131f7fda6b09f4526a0.tar.gz
tor-5c9779f47b4197f658abd131f7fda6b09f4526a0.zip
Make the Exit tag in status documents actually work. They never have so far.
svn:r6607
Diffstat (limited to 'src/or')
-rw-r--r--src/or/policies.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 32c3fbc72f..b7946f9204 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -608,7 +608,6 @@ int
exit_policy_is_general_exit(addr_policy_t *policy)
{
static const int ports[] = { 80, 443, 6667 };
- int n_allowed = 0;
int i;
for (i = 0; i < 3; ++i) {
struct addr_policy_t *p = policy;
@@ -621,11 +620,10 @@ exit_policy_is_general_exit(addr_policy_t *policy)
continue; /* 127.x */
/* We have a match that is at least a /8. */
if (p->policy_type == ADDR_POLICY_ACCEPT)
- ++n_allowed;
- break;
+ return 1;
}
}
- return n_allowed > 0;
+ return 0;
}
/** Release all storage held by <b>p</b> */