diff options
author | teor <teor@torproject.org> | 2020-04-15 13:06:01 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-04-21 12:22:30 -0400 |
commit | 42507429ce45495667c3c334679425210a291226 (patch) | |
tree | c85b4f94a27655c129cf5c03c6fa3bad292aa13f | |
parent | 2e80d7f1938d176e0e32725c090984a20eb0cc5d (diff) | |
download | tor-42507429ce45495667c3c334679425210a291226.tar.gz tor-42507429ce45495667c3c334679425210a291226.zip |
channeltls: Stop truncating IPv6 in logs
Stop truncating IPv6 addresses and ports in channel and connection logs.
Fixes bug 33918; bugfix on 0.2.4.4-alpha.
-rw-r--r-- | changes/bug33918 | 3 | ||||
-rw-r--r-- | src/core/or/channeltls.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/bug33918 b/changes/bug33918 new file mode 100644 index 0000000000..e1467b4aaf --- /dev/null +++ b/changes/bug33918 @@ -0,0 +1,3 @@ + o Minor bugfixes (IPv6, logging): + - Stop truncating IPv6 addresses and ports in channel and connection logs. + Fixes bug 33918; bugfix on 0.2.4.4-alpha. diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index 7974da4832..8112eb64e2 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -563,7 +563,8 @@ channel_tls_get_transport_name_method(channel_t *chan, char **transport_out) static const char * channel_tls_get_remote_descr_method(channel_t *chan, int flags) { -#define MAX_DESCR_LEN 32 + /* IPv6 address, colon, port */ +#define MAX_DESCR_LEN (TOR_ADDR_BUF_LEN + 1 + 5) static char buf[MAX_DESCR_LEN + 1]; channel_tls_t *tlschan = BASE_CHAN_TO_TLS(chan); |