diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-18 15:33:26 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-18 15:33:26 -0500 |
commit | a31a5581eecc900c9e3d7be78ea06a3ea7fe32a3 (patch) | |
tree | fc475732e4a79904fa7f42bd4c369f82b153fd12 /src/or/entrynodes.c | |
parent | 472b277207219d791a399d4d449af6ffdf00a081 (diff) | |
download | tor-a31a5581eecc900c9e3d7be78ea06a3ea7fe32a3.tar.gz tor-a31a5581eecc900c9e3d7be78ea06a3ea7fe32a3.zip |
Remove UseDeprecatedGuardAlgorithm.
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 195c6b98ad..3e3dff3f00 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -546,10 +546,6 @@ choose_guard_selection(const or_options_t *options, { tor_assert(options); tor_assert(type_out); - if (options->UseDeprecatedGuardAlgorithm) { - *type_out = GS_TYPE_LEGACY; - return "legacy"; - } if (options->UseBridges) { *type_out = GS_TYPE_BRIDGE; @@ -2113,9 +2109,6 @@ entry_guard_pick_for_circuit(guard_selection_t *gs, guard_usable_t entry_guard_succeeded(circuit_guard_state_t **guard_state_p) { - if (get_options()->UseDeprecatedGuardAlgorithm) - return GUARD_USABLE_NOW; - if (BUG(*guard_state_p == NULL)) return GUARD_USABLE_NEVER; @@ -2143,8 +2136,6 @@ entry_guard_succeeded(circuit_guard_state_t **guard_state_p) void entry_guard_cancel(circuit_guard_state_t **guard_state_p) { - if (get_options()->UseDeprecatedGuardAlgorithm) - return; if (BUG(*guard_state_p == NULL)) return; entry_guard_t *guard = entry_guard_handle_get((*guard_state_p)->guard); @@ -2166,9 +2157,6 @@ entry_guard_cancel(circuit_guard_state_t **guard_state_p) void entry_guard_failed(circuit_guard_state_t **guard_state_p) { - if (get_options()->UseDeprecatedGuardAlgorithm) - return; - if (BUG(*guard_state_p == NULL)) return; @@ -2191,8 +2179,6 @@ entry_guard_chan_failed(channel_t *chan) { if (!chan) return; - if (get_options()->UseDeprecatedGuardAlgorithm) - return; smartlist_t *pending = smartlist_new(); circuit_get_all_pending_on_channel(pending, chan); @@ -3278,10 +3264,7 @@ const node_t * guards_choose_guard(cpath_build_state_t *state, circuit_guard_state_t **guard_state_out) { - if (get_options()->UseDeprecatedGuardAlgorithm) { - tor_assert_nonfatal_unreached(); - return NULL; - } else { + if (1) { const node_t *r = NULL; const uint8_t *exit_id = NULL; entry_guard_restriction_t *rst = NULL; @@ -3308,11 +3291,7 @@ const node_t * guards_choose_dirguard(dirinfo_type_t info, circuit_guard_state_t **guard_state_out) { - if (get_options()->UseDeprecatedGuardAlgorithm) { - (void)info; - tor_assert_nonfatal_unreached(); - return NULL; - } else { + if (1) { /* XXXX prop271 We don't need to look at the dirinfo_type_t here, * apparently. If you look at the old implementation, and you follow info * downwards through choose_random_dirguard(), into @@ -3320,6 +3299,7 @@ guards_choose_dirguard(dirinfo_type_t info, * find out that it isn't even used, and hasn't been since 0.2.7.1-alpha, * when we realized that every Tor on the network would support * microdescriptors. -NM */ + (void) info; const node_t *r = NULL; if (entry_guard_pick_for_circuit(get_guard_selection_info(), GUARD_USAGE_DIRGUARD, |