]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Demote a warning about finding hops in path if no dir info.
authorMike Perry <mikeperry-git@torproject.org>
Wed, 15 Jun 2022 14:13:09 +0000 (14:13 +0000)
committerMike Perry <mikeperry-git@torproject.org>
Wed, 15 Jun 2022 14:13:09 +0000 (14:13 +0000)
Leave it at notice if we do have enough dir info.

src/core/or/circuitbuild.c

index 8027a965652ead1cfe92d162fbeff148f717e8e2..337bcfdd53b693ff1aa4d6cda0f40deb3bfb71de 100644 (file)
@@ -2520,8 +2520,19 @@ onion_extend_cpath(origin_circuit_t *circ)
   }
 
   if (!info) {
-    log_warn(LD_CIRC,"Failed to find node for hop #%d of our path. Discarding "
-             "this circuit.", cur_len+1);
+    /* This can happen on first startup, possibly due to insufficient relays
+     * downloaded to pick vanguards-lite layer2 nodes, or other ephemeral
+     * reasons. It only happens briefly, is hard to reproduce, and then goes
+     * away for ever. :/ */
+    if (!router_have_minimum_dir_info()) {
+       log_info(LD_CIRC,
+                "Failed to find node for hop #%d of our path. Discarding "
+                "this circuit.", cur_len+1);
+    } else {
+       log_notice(LD_CIRC,
+                 "Failed to find node for hop #%d of our path. Discarding "
+                 "this circuit.", cur_len+1);
+    }
     return -1;
   }