diff options
author | David Goulet <dgoulet@torproject.org> | 2018-01-31 15:23:45 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-01-31 16:10:48 -0500 |
commit | fb93c6fc517f8717891fa8bfb41c9381a12dc491 (patch) | |
tree | c395b724a621bff62bf26a6f52a988503c183d7c /src/or/entrynodes.h | |
parent | a846fd267edf5a457d6647b37ad7ef2ac62a1612 (diff) | |
download | tor-fb93c6fc517f8717891fa8bfb41c9381a12dc491.tar.gz tor-fb93c6fc517f8717891fa8bfb41c9381a12dc491.zip |
circ: Don't cannibalize a circuit if the guard state is unusable
Tor preemptiely builds circuits and they can be cannibalized later in their
lifetime. A Guard node can become unusable (from our guard state) but we can
still have circuits using that node opened. It is important to not pick those
circuits for any usage through the cannibalization process.
Fixes #24469
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r-- | src/or/entrynodes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index aa9c8fe193..b7b110eeb7 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -386,6 +386,8 @@ void entry_guards_note_internet_connectivity(guard_selection_t *gs); 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 |