[tor-commits] [tor/master] Fix for bug 7112 (spewing complaints from tor_addr_is_internal)

nickm at torproject.org nickm at torproject.org
Fri Oct 19 04:04:33 UTC 2012


commit 898bd1ae8f1eeb880eaaeba2caa1cda435a1ac5b
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 17 11:15:01 2012 -0400

    Fix for bug 7112 (spewing complaints from tor_addr_is_internal)
    
    In 4768c0efe3e9471cc367c3740d1a4ba0ab79626c (not in any released
    version of Tor), we removed a little block of code that set the addr
    field of an exit connection used in making a tunneled directory
    request.  Turns out that wasn't right.
---
 src/or/connection_edge.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index e7bc09a..53b57eb 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -3180,7 +3180,12 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
   n_stream->on_circuit = circ;
 
   if (rh.command == RELAY_COMMAND_BEGIN_DIR) {
+    tor_addr_t tmp_addr;
     tor_assert(or_circ);
+    if (or_circ->p_chan &&
+        channel_get_addr_if_possible(or_circ->p_chan, &tmp_addr)) {
+      tor_addr_copy(&n_stream->base_.addr, &tmp_addr);
+    }
     return connection_exit_connect_dir(n_stream);
   }
 





More information about the tor-commits mailing list