diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-30 07:29:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-30 07:29:23 -0500 |
commit | d1e52d9a2a26c1bf9f80b237e692c72517c30495 (patch) | |
tree | ecff8568095e0487267941ba946ae3df0058e155 /src/or/connection.c | |
parent | a87ea9b1c6a61acebc670f54a62e8c443329c34c (diff) | |
download | tor-d1e52d9a2a26c1bf9f80b237e692c72517c30495.tar.gz tor-d1e52d9a2a26c1bf9f80b237e692c72517c30495.zip |
Correctly handle OutboundBindAddress again.
ca5ba2956bcd4b5ee1e526ccf5914f52fe6e6d51 broke this; bug not in any
released Tor.
Also fix a typo.
Fixes 14541 and 14527. Reported by qbi.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index b7dfb1de02..0ce4f72209 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1728,12 +1728,11 @@ connection_connect(connection_t *conn, const char *address, !tor_addr_is_null(&options->OutboundBindAddressIPv6_)) ext_addr = &options->OutboundBindAddressIPv6_; if (ext_addr) { - socklen_t ext_addr_len = 0; memset(&bind_addr_ss, 0, sizeof(bind_addr_ss)); bind_addr_len = tor_addr_to_sockaddr(ext_addr, 0, (struct sockaddr *) &bind_addr_ss, sizeof(bind_addr_ss)); - if (ext_addr_len == 0) { + if (bind_addr_len == 0) { log_warn(LD_NET, "Error converting OutboundBindAddress %s into sockaddr. " "Ignoring.", fmt_and_decorate_addr(ext_addr)); |