aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-08 05:23:55 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-08 05:23:55 +0000
commit0ac3c58480be61eb03e7b43bfcff0859df4a78c7 (patch)
tree1ded8dba5443bc55277c8a9b304d39f5f222cbc3 /src/or/dirserv.c
parent08348ae66e2f37dafbe5eb0ed3acb501739f19c5 (diff)
downloadtor-0ac3c58480be61eb03e7b43bfcff0859df4a78c7.tar
tor-0ac3c58480be61eb03e7b43bfcff0859df4a78c7.tar.gz
clean up comments for router_is_general_exit()
svn:r4917
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e3fabb04f..a8f5a679c 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -941,11 +941,13 @@ dirserv_get_runningrouters(const char **rr, int compress)
"v1 network status list", 1);
}
-/** Return true iff <b>ri</b> is "useful as an exit node." */
+/** Return true iff <b>ri</b> is "useful as an exit node", meaning
+ * it allows exit to at least one /8 address space for at least
+ * one of ports 80, 443, and 6667. */
static int
router_is_general_exit(routerinfo_t *ri)
{
- static const int ports[] = { 80, 443, 194 };
+ static const int ports[] = { 80, 443, 6667 };
int n_allowed = 3;
int i;
for (i = 0; i < 3; ++i) {
@@ -954,10 +956,10 @@ router_is_general_exit(routerinfo_t *ri)
if (policy->prt_min > ports[i] || policy->prt_max < ports[i])
continue; /* Doesn't cover our port. */
if ((policy->msk & 0x00fffffful) != 0)
- continue; /* Wider than /8. */
+ continue; /* Narrower than a /8. */
if ((policy->addr & 0xff000000ul) == 0x7f000000ul)
continue; /* 127.x */
- /* We have a match that is wider than /24. */
+ /* We have a match that is at least a /8. */
if (policy->policy_type != ADDR_POLICY_ACCEPT)
--n_allowed;
break;