summaryrefslogtreecommitdiff
path: root/src/core/or/origin_circuit_st.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/or/origin_circuit_st.h')
-rw-r--r--src/core/or/origin_circuit_st.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/core/or/origin_circuit_st.h b/src/core/or/origin_circuit_st.h
index f55416db14..c40e84aed8 100644
--- a/src/core/or/origin_circuit_st.h
+++ b/src/core/or/origin_circuit_st.h
@@ -1,9 +1,14 @@
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2019, The Tor Project, Inc. */
+ * Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */
+/**
+ * @file origin_circuit_st.h
+ * @brief Origin circuit structure.
+ **/
+
#ifndef ORIGIN_CIRCUIT_ST_H
#define ORIGIN_CIRCUIT_ST_H
@@ -49,7 +54,7 @@ enum path_state_t {
/** Did any SOCKS streams or hidserv introductions actually succeed on
* this circuit?
*
- * If any streams detatch/fail from this circuit, the code transitions
+ * If any streams detach/fail from this circuit, the code transitions
* the circuit back to PATH_STATE_USE_ATTEMPTED to ensure we probe. See
* pathbias_mark_use_rollback() for that.
*/
@@ -161,6 +166,22 @@ struct origin_circuit_t {
* connections to this circuit. */
unsigned int unusable_for_new_conns : 1;
+ /* If this flag is set (due to padding negotiation failure), we should
+ * not try to negotiate further circuit padding. */
+ unsigned padding_negotiation_failed : 1;
+
+ /**
+ * If this flag is set, then a controller chose the first hop of this
+ * circuit's path, and it's okay to ignore checks that we'd usually do
+ * on this circuit's first hop.
+ *
+ * This flag is distinct from the CIRCUIT_PURPOSE_CONTROLLER purpose: the
+ * purpose indicates _what tor can use the circuit for_. Controller-created
+ * circuits can still have the CIRCUIT_PURPOSE_GENERAL purpose if Tor is
+ * allowed to attach streams to them.
+ */
+ unsigned first_hop_from_controller : 1;
+
/**
* Tristate variable to guard against pathbias miscounting
* due to circuit purpose transitions changing the decision
@@ -291,4 +312,4 @@ struct origin_circuit_t {
};
-#endif
+#endif /* !defined(ORIGIN_CIRCUIT_ST_H) */