[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] clean up comments for router_is_general_exit()
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
dirserv.c
Log Message:
clean up comments for router_is_general_exit()
Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -r1.207 -r1.208
--- dirserv.c 7 Sep 2005 16:42:53 -0000 1.207
+++ dirserv.c 8 Sep 2005 05:23:55 -0000 1.208
@@ -941,11 +941,13 @@
"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 @@
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;