]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
channeltls: Stop truncating IPv6 in logs
authorteor <teor@torproject.org>
Wed, 15 Apr 2020 03:06:01 +0000 (13:06 +1000)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Apr 2020 16:22:30 +0000 (12:22 -0400)
Stop truncating IPv6 addresses and ports in channel and connection logs.

Fixes bug 33918; bugfix on 0.2.4.4-alpha.

changes/bug33918 [new file with mode: 0644]
src/core/or/channeltls.c

diff --git a/changes/bug33918 b/changes/bug33918
new file mode 100644 (file)
index 0000000..e1467b4
--- /dev/null
@@ -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.
index 7974da483238675b58bef2b0b223e6925a830309..8112eb64e2aca703e3fa4d5e24114a482146cf0c 100644 (file)
@@ -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);