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

[or-cvs] bugfix in exit_policy_is_general_exit() that weasel found.



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	policies.c 
Log Message:
bugfix in exit_policy_is_general_exit() that weasel found.
this time for sure!


Index: policies.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/policies.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -d -r1.5 -r1.6
--- policies.c	13 Jun 2006 09:16:09 -0000	1.5
+++ policies.c	13 Jun 2006 10:48:26 -0000	1.6
@@ -620,8 +620,10 @@ exit_policy_is_general_exit(addr_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;