[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make router_is_general_exit match its documentation



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:
make router_is_general_exit match its documentation
but it's still wrong maybe


Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- dirserv.c	18 Sep 2005 02:22:21 -0000	1.236
+++ dirserv.c	20 Sep 2005 03:40:54 -0000	1.237
@@ -1095,7 +1095,7 @@
 router_is_general_exit(routerinfo_t *ri)
 {
   static const int ports[] = { 80, 443, 6667 };
-  int n_allowed = 3;
+  int n_allowed = 0;
   int i;
   for (i = 0; i < 3; ++i) {
     struct addr_policy_t *policy = ri->exit_policy;
@@ -1107,8 +1107,8 @@
       if ((policy->addr & 0xff000000ul) == 0x7f000000ul)
         continue; /* 127.x */
       /* We have a match that is at least a /8. */
-      if (policy->policy_type != ADDR_POLICY_ACCEPT)
-        --n_allowed;
+      if (policy->policy_type == ADDR_POLICY_ACCEPT)
+        ++n_allowed;
       break;
     }
   }