[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Only retry connecting to configured bridges



commit 4cb59ceb8ef603f5661f87e4787d45255fbe210c
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Sat Jan 31 09:34:24 2015 +0000

    Only retry connecting to configured bridges
    
    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    |    5 +++++
 src/or/entrynodes.c |    4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug14216 b/changes/bug14216
new file mode 100644
index 0000000..47893ce
--- /dev/null
+++ b/changes/bug14216
@@ -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.
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 5b0e342..17cb825 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -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 */



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits