]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.3.4'
authorNick Mathewson <nickm@torproject.org>
Fri, 24 Aug 2018 16:05:39 +0000 (12:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 24 Aug 2018 16:05:39 +0000 (12:05 -0400)
1  2 
src/feature/nodelist/nodelist.c

index 4a0cb4fba8ccf14448065413cfdf0e808955b2a1,7540da7eb65cfd46e2ea73e62f4cdff96d5553fa..a0f068cf909d37a9e507de96c48ebca40e8c866f
@@@ -2273,27 -2263,27 +2288,32 @@@ compute_frac_paths_available(const netw
                           CONSENSUS_PATH_EXIT :
                           CONSENSUS_PATH_INTERNAL);
  
-   if (have_consensus_path == CONSENSUS_PATH_INTERNAL
-       && old_have_consensus_path != have_consensus_path) {
-     log_notice(LD_NET,
-                "The current consensus has no exit nodes. "
-                "Tor can only build internal paths, "
-                "such as paths to hidden services.");
-     /* However, exit nodes can reachability self-test using this consensus,
-      * join the network, and appear in a later consensus. This will allow
-      * the network to build exit paths, such as paths for world wide web
-      * browsing (as distinct from hidden service web browsing). */
+   if (old_have_consensus_path != have_consensus_path) {
+     if (have_consensus_path == CONSENSUS_PATH_INTERNAL) {
+       log_notice(LD_NET,
+                  "The current consensus has no exit nodes. "
+                  "Tor can only build internal paths, "
+                  "such as paths to onion services.");
+       /* However, exit nodes can reachability self-test using this consensus,
+        * join the network, and appear in a later consensus. This will allow
+        * the network to build exit paths, such as paths for world wide web
+        * browsing (as distinct from hidden service web browsing). */
+     } else if (old_have_consensus_path == CONSENSUS_PATH_INTERNAL) {
+       log_notice(LD_NET,
+                  "The current consensus contains exit nodes. "
+                  "Tor can build exit and internal paths.");
+     }
    }
  
 -  f_guard = frac_nodes_with_descriptors(guards, WEIGHT_FOR_GUARD);
 -  f_mid   = frac_nodes_with_descriptors(mid,    WEIGHT_FOR_MID);
 -  f_exit  = frac_nodes_with_descriptors(exits,  WEIGHT_FOR_EXIT);
 +  f_guard = frac_nodes_with_descriptors(guards, WEIGHT_FOR_GUARD, 1);
 +  f_mid   = frac_nodes_with_descriptors(mid,    WEIGHT_FOR_MID,   0);
 +  f_exit  = frac_nodes_with_descriptors(exits,  WEIGHT_FOR_EXIT,  0);
 +
 +  /* If we are using bridges and have at least one bridge with a full
 +   * descriptor, assume f_guard is 1.0. */
 +  if (options->UseBridges && num_bridges_usable(0) > 0)
 +    f_guard = 1.0;
  
    log_debug(LD_NET,
              "f_guard: %.2f, f_mid: %.2f, f_exit: %.2f",