From: Roger Dingledine Date: Tue, 13 Jun 2006 10:48:26 +0000 (+0000) Subject: bugfix in exit_policy_is_general_exit() that weasel found. X-Git-Tag: tor-0.1.1.23~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88dadc917cf48d234c9fab82751eece5ef119107;p=thirdparty%2Ftor.git bugfix in exit_policy_is_general_exit() that weasel found. this time for sure! svn:r6617 --- diff --git a/src/or/policies.c b/src/or/policies.c index 31622a0120..2cad5777ed 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;