]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Let 0.2.3 clients exit to internal addresses if they want
authorRoger Dingledine <arma@torproject.org>
Mon, 22 Oct 2012 19:45:39 +0000 (15:45 -0400)
committerRoger Dingledine <arma@torproject.org>
Tue, 23 Oct 2012 21:18:01 +0000 (17:18 -0400)
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.

changes/bug7190 [new file with mode: 0644]
src/or/policies.c

diff --git a/changes/bug7190 b/changes/bug7190
new file mode 100644 (file)
index 0000000..1607f79
--- /dev/null
@@ -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.
+
index bbd6816ffc1768f7cb20e5089e21382855eca04a..81e4809687bf2b72dcfb82f58cdf9b885edfc9fe 100644 (file)
@@ -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) {