]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only retry connecting to configured bridges
authorMatthew Finkel <Matthew.Finkel@gmail.com>
Sat, 31 Jan 2015 09:34:24 +0000 (09:34 +0000)
committerMatthew Finkel <Matthew.Finkel@gmail.com>
Sat, 31 Jan 2015 09:46:18 +0000 (09:46 +0000)
After connectivity problems, only try connecting to bridges which
are currently configured; don't mark bridges which we previously
used but are no longer configured.  Fixes 14216.  Reported by
and fix provided by arma.

changes/bug14216 [new file with mode: 0644]
src/or/entrynodes.c

diff --git a/changes/bug14216 b/changes/bug14216
new file mode 100644 (file)
index 0000000..47893ce
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - When we are using bridges and we had a network connectivity problem, only
+      retry connecting to our currently configured bridges, not all bridges we
+      know about and remember using.
+      Fixes bug 14216; bugfix on tor-0.2.2.17-alpha. Patch from arma.
index 5b0e342662700c78296b1badbcb587d0c966ae04..17cb825de3a1076da6a509e17e9a9fac6d9b5b43 100644 (file)
@@ -2368,7 +2368,9 @@ entries_retry_helper(const or_options_t *options, int act)
   SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, e) {
       node = node_get_by_id(e->identity);
       if (node && node_has_descriptor(node) &&
-          node_is_bridge(node) == need_bridges) {
+          node_is_bridge(node) == need_bridges &&
+          (!need_bridges || (!e->bad_since &&
+                             node_is_a_configured_bridge(node)))) {
         any_known = 1;
         if (node->is_running)
           any_running = 1; /* some entry is both known and running */