]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't mark guards as unreachable if connection_connect() fails.
authorGeorge Kadianakis <desnacked@riseup.net>
Wed, 23 Mar 2016 11:35:37 +0000 (13:35 +0200)
committerNick Mathewson <nickm@torproject.org>
Thu, 7 Apr 2016 14:59:46 +0000 (10:59 -0400)
changes/bug14334 [new file with mode: 0644]
src/or/connection_or.c

diff --git a/changes/bug14334 b/changes/bug14334
new file mode 100644 (file)
index 0000000..c53781e
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (guards):
+    - Don't mark guards as unreachable if connection_connect() fails. That
+      function fails for local reasons, so it shouldn't reveal anything about
+      the status of the guard. Fixes bug #14334; bugfix on 0.2.3.10-alpha.
index ea49bdba7700792ba6826a2b173d1576f304a234..369ed202e12b4a038b5cbf03611b4e94fadb6827 100644 (file)
@@ -1281,11 +1281,9 @@ connection_or_connect, (const tor_addr_t *_addr, uint16_t port,
   switch (connection_connect(TO_CONN(conn), conn->base_.address,
                              &addr, port, &socket_error)) {
     case -1:
-      /* If the connection failed immediately, and we're using
-       * a proxy, our proxy is down. Don't blame the Tor server. */
-      if (conn->base_.proxy_state == PROXY_INFANT)
-        entry_guard_register_connect_status(conn->identity_digest,
-                                            0, 1, time(NULL));
+      /* We failed to establish a connection probably because of a local
+       * error. No need to blame the guard in this case. Notify the networking
+       * system of this failure. */
       connection_or_connect_failed(conn,
                                    errno_to_orconn_end_reason(socket_error),
                                    tor_socket_strerror(socket_error));