aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-10-22 15:45:39 -0400
committerRoger Dingledine <arma@torproject.org>2012-10-23 17:18:01 -0400
commit2ecee3fce2179c6fe9f9c748522e417b887ee021 (patch)
tree0364cd0f3303c51e0621f4047d966510c23a3d99
parent85659d3964669f9f419123c648e517f4ba539462 (diff)
downloadtor-2ecee3fce2179c6fe9f9c748522e417b887ee021.tar
tor-2ecee3fce2179c6fe9f9c748522e417b887ee021.tar.gz
Let 0.2.3 clients exit to internal addresses if they want
Clients now consider the ClientRejectInternalAddresses config option when using a microdescriptor consensus stanza to decide whether an exit relay would allow exiting to an internal address. Fixes bug 7190; bugfix on 0.2.3.1-alpha.
-rw-r--r--changes/bug71906
-rw-r--r--src/or/policies.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/changes/bug7190 b/changes/bug7190
new file mode 100644
index 000000000..1607f7944
--- /dev/null
+++ b/changes/bug7190
@@ -0,0 +1,6 @@
+ o Minor bugfixes:
+ - Clients now consider the ClientRejectInternalAddresses config option
+ when using a microdescriptor consensus stanza to decide whether
+ an exit relay would allow exiting to an internal address. Fixes
+ bug 7190; bugfix on 0.2.3.1-alpha.
+
diff --git a/src/or/policies.c b/src/or/policies.c
index bbd6816ff..81e480968 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -1462,15 +1462,14 @@ compare_tor_addr_to_short_policy(const tor_addr_t *addr, uint16_t port,
int i;
int found_match = 0;
int accept;
- (void)addr;
tor_assert(port != 0);
if (addr && tor_addr_is_null(addr))
addr = NULL; /* Unspec means 'no address at all,' in this context. */
- if (addr && (tor_addr_is_internal(addr, 0) ||
- tor_addr_is_loopback(addr)))
+ if (addr && get_options()->ClientRejectInternalAddresses &&
+ (tor_addr_is_internal(addr, 0) || tor_addr_is_loopback(addr)))
return ADDR_POLICY_REJECTED;
for (i=0; i < policy->n_entries; ++i) {