summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-06-12 22:03:25 +0000
committerPeter Palfrader <peter@palfrader.org>2006-06-12 22:03:25 +0000
commitcce8ae1190ce205b4cd8905ef547d3deb6531695 (patch)
tree4c90e2132b311496ad18ec7b46aab4f4e52076f5 /src/or/policies.c
parent87e3800dfc0adcd6cb4e57e693072fd2d07217b1 (diff)
downloadtor-cce8ae1190ce205b4cd8905ef547d3deb6531695.tar.gz
tor-cce8ae1190ce205b4cd8905ef547d3deb6531695.zip
Make the Exit tag in status documents actually work in head too
svn:r6608
Diffstat (limited to 'src/or/policies.c')
-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> */