aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/channeltls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-14 14:08:55 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-16 09:02:10 -0400
commitdb21e91f4bda5860dea2d817c1f707f57119abee (patch)
tree87c80d62b2579d3eea5c41143cac8de61ad39e7d /src/core/or/channeltls.c
parent0ccdf05dc54bf956348b0647414732b6a497d17a (diff)
downloadtor-db21e91f4bda5860dea2d817c1f707f57119abee.tar.gz
tor-db21e91f4bda5860dea2d817c1f707f57119abee.zip
Remove "ADDR_ONLY" mode from channel_get_*_remote_descr.
This mode was only used in one place, and it caused a dangerous mingling of functionality. The method is supposed to _describe_ the peer's address, not give its actual address. We already had a function to get the actual address.
Diffstat (limited to 'src/core/or/channeltls.c')
-rw-r--r--src/core/or/channeltls.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c
index 8273235efb..3a10b2c27d 100644
--- a/src/core/or/channeltls.c
+++ b/src/core/or/channeltls.c
@@ -601,18 +601,6 @@ channel_tls_get_remote_descr_method(channel_t *chan, int flags)
tor_free(addr_str);
answer = buf;
break;
- case GRD_FLAG_ADDR_ONLY:
- /* Canonical address, no port */
- strlcpy(buf, conn->address, sizeof(buf));
- answer = buf;
- break;
- case GRD_FLAG_ORIGINAL|GRD_FLAG_ADDR_ONLY:
- /* Actual address, no port */
- addr_str = tor_addr_to_str_dup(&(tlschan->conn->real_addr));
- strlcpy(buf, addr_str, sizeof(buf));
- tor_free(addr_str);
- answer = buf;
- break;
default:
/* Something's broken in channel.c */
tor_assert_nonfatal_unreached_once();