]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
channel_tls_get_remote_addr_method now returns real_addr.
authorFernando Fernandez Mancera <ffmancera@riseup.net>
Mon, 22 Jan 2018 14:20:17 +0000 (15:20 +0100)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 31 Jan 2018 21:12:13 +0000 (16:12 -0500)
The accurate address of a connection is real_addr, not the addr member.
channel_tls_get_remote_addr_method() now returns real_addr instead.

Fixes #24952; bugfix on 707c1e2 in 0.2.4.11-alpha.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
changes/bug24952 [new file with mode: 0644]
src/or/channeltls.c

diff --git a/changes/bug24952 b/changes/bug24952
new file mode 100644 (file)
index 0000000..93174c0
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfix (channel connection):
+    - The accurate address of a connection is real_addr, not the addr member.
+      TLS Channel remote address is now real_addr content instead of addr
+      member. Fixes bug 24952; bugfix on 707c1e2e26 in 0.2.4.11-alpha.
+      Patch by "ffmancera".
index 09cca95b64bc599424d56a5658e57b1256c75a07..890646989eccc32ed61c8290d14a44ae78d84900 100644 (file)
@@ -514,7 +514,7 @@ channel_tls_get_remote_addr_method(channel_t *chan, tor_addr_t *addr_out)
   tor_assert(addr_out);
 
   if (tlschan->conn) {
-    tor_addr_copy(addr_out, &(TO_CONN(tlschan->conn)->addr));
+    tor_addr_copy(addr_out, &(tlschan->conn->real_addr));
     rv = 1;
   } else tor_addr_make_unspec(addr_out);