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

[or-cvs] Try to fix policy_includes_addr_mask_implicitly()



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv30846/src/or

Modified Files:
	routerlist.c 
Log Message:
Try to fix policy_includes_addr_mask_implicitly()

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -p -d -r1.431 -r1.432
--- routerlist.c	1 Feb 2006 02:31:27 -0000	1.431
+++ routerlist.c	1 Feb 2006 02:52:55 -0000	1.432
@@ -2494,7 +2494,8 @@ policy_includes_addr_mask_implicitly(add
     uint32_t p_addr = policy->addr & policy->msk;
     if (p_addr == (addr & policy->msk) &&
         p_addr == (addr2 & policy->msk) &&
-        (policy->prt_min <= 1 && policy->prt_max == 65535)) {
+        (policy->prt_min <= 1 && policy->prt_max == 65535) &&
+        policy->policy_type == ADDR_POLICY_REJECT) {
       return 0;
     }
     /* Does this policy cover some of the address range we're looking at? */
@@ -2538,7 +2539,7 @@ exit_policy_implicitly_allows_local_netw
   };
   for (i=0; private_networks[i].mask; ++i) {
     p = NULL;
-    /* log_fn(LOG_INFO,"Checking network %s", private_networks[i].network); */
+    /* info(LD_CONFIG,"Checking network %s", private_networks[i].network); */
     if (policy_includes_addr_mask_implicitly(
            policy, private_networks[i].addr, private_networks[i].mask, &p)) {
       if (should_warn)