]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
entrynodes: Move guard dirinfo check below path dirinfo check.
authorGeorge Kadianakis <desnacked@riseup.net>
Tue, 3 Oct 2017 11:16:49 +0000 (14:16 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Tue, 3 Oct 2017 11:41:18 +0000 (14:41 +0300)
We do that because we want to use the path fraction dirinfo data in case
we are missing primary guard dirinfo.

src/or/nodelist.c

index 93dd43f3cdd63eb2e2c7d52c43b7fc1317eeb4aa..ff26065ff2e96d5316da84ec23014465471f96f4 100644 (file)
@@ -2300,16 +2300,6 @@ update_router_have_minimum_dir_info(void)
 
   using_md = consensus->flavor == FLAV_MICRODESC;
 
-  { /* Check entry guard dirinfo status */
-    char *guard_error = entry_guards_get_dir_info_status_str();
-    if (guard_error) {
-      strlcpy(dir_info_status, guard_error, sizeof(dir_info_status));
-      tor_free(guard_error);
-      res = 0;
-      goto done;
-    }
-  }
-
   /* Check fraction of available paths */
   {
     char *status = NULL;
@@ -2334,6 +2324,17 @@ update_router_have_minimum_dir_info(void)
     res = 1;
   }
 
+  { /* Check entry guard dirinfo status */
+    char *guard_error = entry_guards_get_dir_info_status_str();
+    if (guard_error) {
+      strlcpy(dir_info_status, guard_error, sizeof(dir_info_status));
+      tor_free(guard_error);
+      res = 0;
+      goto done;
+    }
+  }
+
+
  done:
 
   /* If paths have just become available in this update. */