Pārlūkot izejas kodu

Merge remote-tracking branch 'tor-github/pr/1066' into maint-0.3.5

teor 5 gadi atpakaļ
vecāks
revīzija
31fb2bceb5
3 mainītis faili ar 16 papildinājumiem un 1 dzēšanām
  1. 11 0
      changes/bug29875
  2. 2 1
      src/app/config/config.c
  3. 3 0
      src/feature/client/entrynodes.c

+ 11 - 0
changes/bug29875

@@ -0,0 +1,11 @@
+  o Major bugfixes (bridges):
+    - Do not count previously configured working bridges towards our total of
+      working bridges. Previously, when Tor's list of bridges changed, it
+      would think that the old bridges were still usable, and delay fetching
+      router descriptors for the new ones.  Fixes part of bug 29875; bugfix
+      on 0.3.0.1-alpha.
+    - Consider our directory information to have changed when our list of
+      bridges changes. Previously, Tor would not re-compute the status of its
+      directory information when bridges changed, and therefore would not
+      realize that it was no longer able to build circuits. Fixes part of bug
+      29875.

+ 2 - 1
src/app/config/config.c

@@ -2412,7 +2412,8 @@ options_act(const or_options_t *old_options)
     if (!bool_eq(directory_fetches_dir_info_early(options),
                  directory_fetches_dir_info_early(old_options)) ||
         !bool_eq(directory_fetches_dir_info_later(options),
-                 directory_fetches_dir_info_later(old_options))) {
+                 directory_fetches_dir_info_later(old_options)) ||
+        !config_lines_eq(old_options->Bridges, options->Bridges)) {
       /* Make sure update_router_have_minimum_dir_info() gets called. */
       router_dir_info_changed();
       /* We might need to download a new consensus status later or sooner than

+ 3 - 0
src/feature/client/entrynodes.c

@@ -3300,6 +3300,9 @@ num_bridges_usable,(int use_maybe_reachable))
   }
 
   SMARTLIST_FOREACH_BEGIN(gs->sampled_entry_guards, entry_guard_t *, guard) {
+    /* Not a bridge, or not one we are configured to be able to use. */
+    if (! guard->is_filtered_guard)
+      continue;
     /* Definitely not usable */
     if (guard->is_reachable == GUARD_REACHABLE_NO)
       continue;