Commit 32d9d693 authored by Nick Mathewson's avatar Nick Mathewson
Browse files

Merge remote-tracking branch 'github/bug26568_034' into maint-0.3.4

parents d38e4749 dfdf3240
o Minor bugfixes (controller):
- Report the port correctly when a port is configured to bind to "auto".
Fixes bug 26568; bugfix on
......@@ -1260,12 +1260,15 @@ connection_listener_new(const struct sockaddr *listensockaddr,
gotPort = usePort;
} else {
tor_addr_t addr2;
if (tor_addr_from_getsockname(&addr2, s)<0) {
struct sockaddr_storage ss;
socklen_t ss_len=sizeof(ss);
if (getsockname(s, (struct sockaddr*)&ss, &ss_len)<0) {
log_warn(LD_NET, "getsockname() couldn't learn address for %s: %s",
gotPort = 0;
tor_addr_from_sockaddr(&addr2, (struct sockaddr*)&ss, &gotPort);
#ifdef HAVE_SYS_UN_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment