summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2020-06-30 14:23:17 +0000
committerAlexander Færøy <ahf@torproject.org>2020-06-30 14:23:17 +0000
commit8697205be400e560c7ae4083d7febd7aa593e61a (patch)
treea539d854b392476477b8376ef544d5bc73a3b2d5 /src/feature
parent8444fbe904141d7954efe221b663efee1774df41 (diff)
parent39f2411b3f5ab1a50c74fdafb432d5286c451ab7 (diff)
downloadtor-8697205be400e560c7ae4083d7febd7aa593e61a.tar.gz
tor-8697205be400e560c7ae4083d7febd7aa593e61a.zip
Merge branch 'tor-github/pr/1909' into maint-0.3.5
Diffstat (limited to 'src/feature')
-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 7c2159ce84..8d9230b66b 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;
}