summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-24 09:18:39 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-24 09:18:39 -0400
commitf4f828640f25d73e9a29c3d901af4ab594de0d56 (patch)
tree001538262d89bec06ab62cb9d509fadeedc6af35 /src/or/circuitbuild.c
parent53c82c0821737ce76bb99a75b5f309d0b2d715ba (diff)
parentdf3bdc6bdeb7e8eef13248ba245a70fd8cbf1f86 (diff)
downloadtor-f4f828640f25d73e9a29c3d901af4ab594de0d56.tar.gz
tor-f4f828640f25d73e9a29c3d901af4ab594de0d56.zip
Merge branch 'bug22779_031'
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 9a95015005..65cd7bd5dc 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2468,9 +2468,6 @@ choose_good_middle_server(uint8_t purpose,
* router (if we're an OR), and respect firewall settings; if we're
* configured to use entry guards, return one.
*
- * If <b>state</b> is NULL, we're choosing a router to serve as an entry
- * guard, not for any particular circuit.
- *
* Set *<b>guard_state_out</b> to information about the guard that
* we're selecting, which we'll use later to remember whether the
* guard worked or not.
@@ -2488,6 +2485,11 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state,
CRN_DIRECT_CONN);
const node_t *node;
+ /* Once we used this function to select a node to be a guard. We had
+ * 'state == NULL' be the signal for that. But we don't do that any more.
+ */
+ tor_assert_nonfatal(state);
+
if (state && options->UseEntryGuards &&
(purpose != CIRCUIT_PURPOSE_TESTING || options->BridgeRelay)) {
/* This request is for an entry server to use for a regular circuit,