aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_address.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-09-15 18:34:18 +1000
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-09-16 02:56:50 +1000
commit098b82c7b2a6bb711e3616eb5b7e7e5e7401f01d (patch)
treebc40d90c97de2a09a6c1e277ea3c5f2c455f8787 /src/test/test_address.c
parent31eb486c4624d1437d982ffdfc1f9d7d83c5ffd6 (diff)
downloadtor-098b82c7b2a6bb711e3616eb5b7e7e5e7401f01d.tar.gz
tor-098b82c7b2a6bb711e3616eb5b7e7e5e7401f01d.zip
ExitPolicyRejectPrivate rejects local IPv6 address and interface addresses
ExitPolicyRejectPrivate now rejects more local addresses by default: * the relay's published IPv6 address (if any), and * any publicly routable IPv4 or IPv6 addresses on any local interfaces. This resolves a security issue for IPv6 Exits and multihomed Exits that trust connections originating from localhost. Resolves ticket 17027. Patch by "teor". Patch on 42b8fb5a1523 (11 Nov 2007), released in 0.2.0.11-alpha.
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r--src/test/test_address.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c
index 5a4126799e..72742df2cd 100644
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@ -149,7 +149,6 @@ smartlist_contains_ipv6_tor_addr(smartlist_t *smartlist)
return 0;
}
-
#ifdef HAVE_IFADDRS_TO_SMARTLIST
static void
test_address_ifaddrs_to_smartlist(void *arg)
@@ -700,7 +699,7 @@ test_address_get_if_addrs_list_internal(void *arg)
tt_assert(smartlist_contains_ipv4_tor_addr(results));
tt_assert(!smartlist_contains_ipv6_tor_addr(results));
-done:
+ done:
free_interface_address_list(results);
return;
}
@@ -725,7 +724,7 @@ test_address_get_if_addrs_list_no_internal(void *arg)
/* The list may or may not contain IPv4 addresses */
tt_assert(!smartlist_contains_ipv6_tor_addr(results));
-done:
+ done:
free_interface_address_list(results);
return;
}
@@ -750,7 +749,7 @@ test_address_get_if_addrs6_list_internal(void *arg)
tt_assert(!smartlist_contains_ipv4_tor_addr(results));
/* The list may or may not contain IPv6 addresses */
-done:
+ done:
free_interface_address6_list(results);
return;
}
@@ -775,7 +774,7 @@ test_address_get_if_addrs6_list_no_internal(void *arg)
tt_assert(!smartlist_contains_ipv4_tor_addr(results));
/* The list may or may not contain IPv6 addresses */
-done:
+ done:
free_interface_address6_list(results);
return;
}
@@ -802,7 +801,7 @@ test_address_get_if_addrs(void *arg)
tt_assert(tor_addr_is_v4(&tor_addr));
-done:
+ done:
return;
}
@@ -825,7 +824,7 @@ test_address_get_if_addrs6(void *arg)
tt_assert(!tor_addr_is_v4(&tor_addr));
}
-done:
+ done:
return;
}