[or-cvs] [tor/release-0.2.2 017/162] actually retry bridges when your network goes away

arma at torproject.org arma at torproject.org
Mon Dec 20 03:06:29 UTC 2010


Author: Roger Dingledine <arma at torproject.org>
Date: Tue, 28 Sep 2010 18:36:15 -0400
Subject: actually retry bridges when your network goes away
Commit: 339993b409648bf3d767c6ba3133e1921de89dbd

---
 changes/bug1981       |    6 ++++++
 src/or/circuitbuild.c |    7 ++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
 create mode 100644 changes/bug1981

diff --git a/changes/bug1981 b/changes/bug1981
new file mode 100644
index 0000000..3e5e1d3
--- /dev/null
+++ b/changes/bug1981
@@ -0,0 +1,6 @@
+  o Major bugfixes:
+    - When you use bridges and your network goes away and your bridges
+      get marked as down, recover when you attempt a new socks connection
+      (if the network is back) rather than waiting up to an hour to try
+      fetching new descriptors for your bridges. Bugfix on 0.2.0.3-alpha;
+      fixes bug 1981.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 3d0f728..94057c3 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -3162,6 +3162,10 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
       add_an_entry_guard(ri, 1);
       log_notice(LD_DIR, "new bridge descriptor '%s' (%s)", ri->nickname,
                  from_cache ? "cached" : "fresh");
+      /* set entry->made_contact so if it goes down we don't drop it from
+       * our entry node list */
+      entry_guard_register_connect_status(ri->cache_info.identity_digest,
+                                          1, 0, now);
       if (first)
         routerlist_retry_directory_downloads(now);
     }
@@ -3227,7 +3231,8 @@ bridges_retry_helper(int act)
         }
       }
     });
-  log_debug(LD_DIR, "any_known %d, any_running %d", any_known, any_running);
+  log_debug(LD_DIR, "%d: any_known %d, any_running %d",
+            act, any_known, any_running);
   return any_known && !any_running;
 }
 
-- 
1.7.1




More information about the tor-commits mailing list