aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-06-13 10:48:26 +0000
committerRoger Dingledine <arma@torproject.org>2006-06-13 10:48:26 +0000
commit88dadc917cf48d234c9fab82751eece5ef119107 (patch)
treeca7f5676b0050eff78ca4dd4c0d7813dbb304aee /src/or/policies.c
parent23e2c6a7ddec2821d85443900265546ee7b373da (diff)
downloadtor-88dadc917cf48d234c9fab82751eece5ef119107.tar
tor-88dadc917cf48d234c9fab82751eece5ef119107.tar.gz
bugfix in exit_policy_is_general_exit() that weasel found.
this time for sure! svn:r6617
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 31622a012..2cad5777e 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -620,8 +620,10 @@ exit_policy_is_general_exit(addr_policy_t *policy)
if ((p->addr & 0xff000000ul) == 0x7f000000ul)
continue; /* 127.x */
/* We have a match that is at least a /8. */
- if (p->policy_type == ADDR_POLICY_ACCEPT)
+ if (p->policy_type == ADDR_POLICY_ACCEPT) {
++n_allowed;
+ break; /* stop considering this port */
+ }
}
}
return n_allowed >= 2;