[tor-commits] [tor/maint-0.4.0] Log the correct "auto" port number for listening sockets
nickm at torproject.org
nickm at torproject.org
Thu Mar 7 13:57:04 UTC 2019
commit 389ee834b6795ccabbe3d4c7edfdaf8d89696438
Author: Kris Katterjohn <katterjohn at gmail.com>
Date: Mon Jan 21 13:12:53 2019 -0600
Log the correct "auto" port number for listening sockets
When "auto" was used for the port number for a listening socket, the
message logged after opening the socket would incorrectly say port 0
instead of the actual port used.
Fixes bug 29144; bugfix on 0.3.5.1-alpha
Signed-off-by: Kris Katterjohn <katterjohn at gmail.com>
---
changes/bug29144 | 5 +++++
src/core/mainloop/connection.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/changes/bug29144 b/changes/bug29144
new file mode 100644
index 000000000..5801224f1
--- /dev/null
+++ b/changes/bug29144
@@ -0,0 +1,5 @@
+ o Minor bugfixes (logging):
+ - Log the correct port number for listening sockets when "auto" is
+ used to let Tor pick the port number. Previously, port 0 was
+ logged instead of the actual port number. Fixes bug 29144;
+ bugfix on 0.3.5.1-alpha. Patch from Kris Katterjohn.
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index f2a646c5f..7b8dc7f36 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -1527,7 +1527,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
conn_type_to_string(type), conn->address);
} else {
log_notice(LD_NET, "Opened %s on %s",
- conn_type_to_string(type), fmt_addrport(&addr, usePort));
+ conn_type_to_string(type), fmt_addrport(&addr, gotPort));
}
return conn;
More information about the tor-commits
mailing list