mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'maint-0.3.4'
This commit is contained in:
commit
2878dad9db
3
changes/bug26568
Normal file
3
changes/bug26568
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (controller):
|
||||
- Report the port correctly when a port is configured to bind to "auto".
|
||||
Fixes bug 26568; bugfix on 0.3.4.1-alpha.
|
@ -1301,12 +1301,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",
|
||||
conn_type_to_string(type),
|
||||
tor_socket_strerror(tor_socket_errno(s)));
|
||||
gotPort = 0;
|
||||
}
|
||||
tor_addr_from_sockaddr(&addr2, (struct sockaddr*)&ss, &gotPort);
|
||||
}
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user