--- /dev/null
+ o Minor bugfixes (circuit, cannibalization):
+ - Don't cannibalize circuits for which we don't know the first hop which
+ can happen if our Guard relay went off the consensus after the circuit
+ was created preemptively. Fixes bug 24469; bugfix on 0.0.6.
goto next;
}
+ /* Ignore any circuits for which we can't use the Guard. It is possible
+ * that the Guard was removed from the samepled set after the circuit
+ * was created so avoid using it. */
+ if (!entry_guard_could_succeed(circ->guard_state)) {
+ goto next;
+ }
+
if ((!need_uptime || circ->build_state->need_uptime) &&
(!need_capacity || circ->build_state->need_capacity) &&
(internal == circ->build_state->is_internal) &&
entry_guards_dirty = 0;
}
+/** Return true iff the circuit's guard can succeed that is can be used. */
+int
+entry_guard_could_succeed(const circuit_guard_state_t *guard_state)
+{
+ if (!guard_state) {
+ return 0;
+ }
+
+ entry_guard_t *guard = entry_guard_handle_get(guard_state->guard);
+ if (!guard || BUG(guard->in_selection == NULL)) {
+ return 0;
+ }
+
+ return 1;
+}
+
/**
* Format a single entry guard in the format expected by the controller.
* Return a newly allocated string.
int update_guard_selection_choice(const or_options_t *options);
+int entry_guard_could_succeed(const circuit_guard_state_t *guard_state);
+
MOCK_DECL(int,num_bridges_usable,(int use_maybe_reachable));
#ifdef ENTRYNODES_PRIVATE