diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-11-06 19:38:47 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-17 09:52:40 -0500 |
commit | f61e3090fb2975ad8c2a5e138b87c62428c5f46b (patch) | |
tree | 7a59ab0a92891498e8cf517636f0e6506ed70beb /src/or/directory.c | |
parent | 7fc64f02a3057405f9e75d70848afd2e9b95da05 (diff) | |
download | tor-f61e3090fb2975ad8c2a5e138b87c62428c5f46b.tar.gz tor-f61e3090fb2975ad8c2a5e138b87c62428c5f46b.zip |
Introduce new guard restriction and use it to skip outdated dirs.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 129309ae47..aec8ef5bf0 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -464,7 +464,7 @@ directory_pick_generic_dirserver(dirinfo_type_t type, int pds_flags, log_warn(LD_BUG, "Called when we have UseBridges set."); if (should_use_directory_guards(options)) { - const node_t *node = guards_choose_dirguard(guard_state_out); + const node_t *node = guards_choose_dirguard(dir_purpose, guard_state_out); if (node) rs = node->rs; } else { @@ -598,7 +598,7 @@ directory_get_from_dirserver,( * sort of dir fetch we'll be doing, so it won't return a bridge * that can't answer our question. */ - const node_t *node = guards_choose_dirguard(&guard_state); + const node_t *node = guards_choose_dirguard(dir_purpose, &guard_state); if (node && node->ri) { /* every bridge has a routerinfo. */ routerinfo_t *ri = node->ri; |