summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-02-01 02:31:27 +0000
committerPeter Palfrader <peter@palfrader.org>2006-02-01 02:31:27 +0000
commit61ea27620a075c5218579357fa1e566e02f49288 (patch)
tree692c36ef609bd241e44fd0a6660bcef1d901d279 /src
parent686508a04a5bed44dc8217d0ad444430fc5dcd87 (diff)
downloadtor-61ea27620a075c5218579357fa1e566e02f49288.tar.gz
tor-61ea27620a075c5218579357fa1e566e02f49288.zip
Also catch 0/8 in exit_policy_implicitly_allows_local_networks()
svn:r5885
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 9fd432f927..902bb93dc6 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2528,6 +2528,7 @@ exit_policy_implicitly_allows_local_networks(addr_policy_t *policy,
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_networks(addr_policy_t *policy,
{ 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(