aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-11-15 08:55:47 -0500
committerNick Mathewson <nickm@torproject.org>2021-11-15 08:55:47 -0500
commitdd085d42f96e39f9387aa1d7a306100c0d7df305 (patch)
tree01d83804e8c071e9d347060317ada34a573f69b3 /src/core
parent882fd1f0d45656e0535e70b5e115281b39ac6307 (diff)
downloadtor-dd085d42f96e39f9387aa1d7a306100c0d7df305.tar.gz
tor-dd085d42f96e39f9387aa1d7a306100c0d7df305.zip
Do not count controller-selected paths towards path bias.
As a side effect, this fixes a "Bug" warning. Closes #40515. Bugfix on 0.2.4.10-alpha.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/or/origin_circuit_st.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/or/origin_circuit_st.h b/src/core/or/origin_circuit_st.h
index c40e84aed8..ca7c4b1bef 100644
--- a/src/core/or/origin_circuit_st.h
+++ b/src/core/or/origin_circuit_st.h
@@ -183,6 +183,12 @@ struct origin_circuit_t {
unsigned first_hop_from_controller : 1;
/**
+ * If true, this circuit's path has been chosen, in full or in part,
+ * by the controller API, and it's okay to ignore checks that we'd
+ * usually do on the path as whole. */
+ unsigned int any_hop_from_controller : 1;
+
+ /**
* Tristate variable to guard against pathbias miscounting
* due to circuit purpose transitions changing the decision
* of pathbias_should_count(). This variable is informational