Explorar el Código

Correctly handle OutboundBindAddress again.

ca5ba2956bcd4b5ee1e526ccf5914f52fe6e6d51 broke this; bug not in any
released Tor.

Also fix a typo.

Fixes 14541 and 14527.  Reported by qbi.
Nick Mathewson hace 9 años
padre
commit
d1e52d9a2a
Se han modificado 2 ficheros con 2 adiciones y 3 borrados
  1. 1 1
      src/or/config.c
  2. 1 2
      src/or/connection.c

+ 1 - 1
src/or/config.c

@@ -1617,7 +1617,7 @@ options_act(const or_options_t *old_options)
   }
 
   if (parse_outbound_addresses(options, 0, &msg) < 0) {
-    log_warn(LD_BUG, "Failed parsing oubound bind addresses: %s", msg);
+    log_warn(LD_BUG, "Failed parsing outbound bind addresses: %s", msg);
     tor_free(msg);
     return -1;
   }

+ 1 - 2
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));