[or-cvs] Also catch 0/8 in exit_policy_implicitly_allows_local_netwo...

Peter Palfrader weasel at seul.org
Wed Feb 1 02:31:29 UTC 2006


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

Modified Files:
	routerlist.c 
Log Message:
Also catch 0/8 in exit_policy_implicitly_allows_local_networks()

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.430
retrieving revision 1.431
diff -u -p -d -r1.430 -r1.431
--- routerlist.c	24 Jan 2006 03:45:58 -0000	1.430
+++ routerlist.c	1 Feb 2006 02:31:27 -0000	1.431
@@ -2528,6 +2528,7 @@ exit_policy_implicitly_allows_local_netw
   static struct {
     uint32_t addr; uint32_t mask; const char *network;
   } private_networks[] = {
+    { 0x00000000, 0xff000000, "\"this\" network (0.0.0.0/8)" },
     { 0x7f000000, 0xff000000, "localhost (127.0.0.0/8)" },
     { 0x0a000000, 0xff000000, "addresses in private network 10.0.0.0/8" },
     { 0xa9fe0000, 0xffff0000, "addresses in private network 169.254.0.0/16" },
@@ -2535,7 +2536,7 @@ exit_policy_implicitly_allows_local_netw
     { 0xc0a80000, 0xffff0000, "addresses in private network 192.168.0.0/16" },
     { 0,0,NULL},
   };
-  for (i=0; private_networks[i].addr; ++i) {
+  for (i=0; private_networks[i].mask; ++i) {
     p = NULL;
     /* log_fn(LOG_INFO,"Checking network %s", private_networks[i].network); */
     if (policy_includes_addr_mask_implicitly(



More information about the tor-commits mailing list