aboutsummaryrefslogtreecommitdiff
path: root/src/feature/client
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2020-06-30 14:23:41 +0000
committerAlexander Færøy <ahf@torproject.org>2020-06-30 14:23:41 +0000
commitdbb70d85bf65d33e0a1035146d71a2a610e91056 (patch)
tree17e41f6f0c61dbb0794a0c7da9ca77467f915cdf /src/feature/client
parent881f50a9a98102a4540575713b621652f108aef1 (diff)
parent8697205be400e560c7ae4083d7febd7aa593e61a (diff)
downloadtor-dbb70d85bf65d33e0a1035146d71a2a610e91056.tar.gz
tor-dbb70d85bf65d33e0a1035146d71a2a610e91056.zip
Merge branch 'maint-0.3.5' into maint-0.4.2
Diffstat (limited to 'src/feature/client')
-rw-r--r--src/feature/client/entrynodes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c
index 537ead020b..115d871843 100644
--- a/src/feature/client/entrynodes.c
+++ b/src/feature/client/entrynodes.c
@@ -3452,10 +3452,16 @@ entry_guards_update_state(or_state_t *state)
entry_guards_dirty = 0;
}
-/** Return true iff the circuit's guard can succeed that is can be used. */
+/** 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 (get_options()->UseEntryGuards == 0) {
+ /* we're fine with this circuit's first hop, because we're not
+ * configured to use entry guards. */
+ return 1;
+ }
+
if (!guard_state) {
return 0;
}