diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-06-13 16:12:47 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2011-06-14 21:32:49 -0700 |
commit | 44eafa9697b0adebfa5e18579adcf70cd6d9c935 (patch) | |
tree | 50f9567843657ee2cf7c04381bcfa4bffee7f378 /src/or/rendclient.c | |
parent | ecc9a364c2ff8557f808dc1826e285239a5767a8 (diff) | |
download | tor-44eafa9697b0adebfa5e18579adcf70cd6d9c935.tar.gz tor-44eafa9697b0adebfa5e18579adcf70cd6d9c935.zip |
Assert that HS operations are not performed using single-hop circuits
(with fixes by Nick Mathewson to unbreak the build)
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 3e9c6e8e55..36930fea02 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -145,6 +145,8 @@ rend_client_send_introduction(origin_circuit_t *introcirc, tor_assert(rendcirc->rend_data); tor_assert(!rend_cmp_service_ids(introcirc->rend_data->onion_address, rendcirc->rend_data->onion_address)); + tor_assert(!(introcirc->build_state->onehop_tunnel)); + tor_assert(!(rendcirc->build_state->onehop_tunnel)); if (rend_cache_lookup_entry(introcirc->rend_data->onion_address, -1, &entry) < 1) { @@ -335,6 +337,7 @@ rend_client_introduction_acked(origin_circuit_t *circ, } tor_assert(circ->build_state->chosen_exit); + tor_assert(!(circ->build_state->onehop_tunnel)); tor_assert(circ->rend_data); if (request_len == 0) { @@ -346,6 +349,7 @@ rend_client_introduction_acked(origin_circuit_t *circ, rendcirc = circuit_get_by_rend_query_and_purpose( circ->rend_data->onion_address, CIRCUIT_PURPOSE_C_REND_READY); if (rendcirc) { /* remember the ack */ + tor_assert(!(rendcirc->build_state->onehop_tunnel)); rendcirc->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED; /* Set timestamp_dirty, because circuit_expire_building expects * it to specify when a circuit entered the |