diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-22 15:30:12 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:44:43 -0500 |
commit | d98b9b6d65946e14ee325327d5beac1a60ace6cc (patch) | |
tree | 4e0ca226404e9604ef0dcf5ba1b8dc41b6b81679 /src | |
parent | 783fa2f58637f896d5476d907aa460cae067e51a (diff) | |
download | tor-d98b9b6d65946e14ee325327d5beac1a60ace6cc.tar.gz tor-d98b9b6d65946e14ee325327d5beac1a60ace6cc.zip |
Fix pathbias interactions with entry guards
entry_guard_get_by_id_digest() was always returning NULL, which was
causing "adventure" and "fun"
Diffstat (limited to 'src')
-rw-r--r-- | src/or/entrynodes.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index f1fc055797..81751f565c 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -2351,6 +2351,11 @@ entry_guard_get_by_id_digest_for_guard_selection(guard_selection_t *gs, { tor_assert(gs != NULL); + SMARTLIST_FOREACH(gs->sampled_entry_guards, entry_guard_t *, entry, + if (tor_memeq(digest, entry->identity, DIGEST_LEN)) + return entry; + ); + SMARTLIST_FOREACH(gs->chosen_entry_guards, entry_guard_t *, entry, if (tor_memeq(digest, entry->identity, DIGEST_LEN)) return entry; |