summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-06-16 10:29:29 -0400
committerDavid Goulet <dgoulet@ev0ke.net>2015-06-17 09:32:26 -0400
commita5b5d4bd2ea08c2db84aa53f44111f8492af1f62 (patch)
treec712bb5a39cbccef1232e3c74d9d03dd63d79d92 /src
parent43a98c7da6183e6e2e20784faed9f1c8aea5086e (diff)
downloadtor-a5b5d4bd2ea08c2db84aa53f44111f8492af1f62.tar.gz
tor-a5b5d4bd2ea08c2db84aa53f44111f8492af1f62.zip
Extend intro point to a 4th hop on cannibalization
Fixes #16260 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src')
-rw-r--r--src/or/circuituse.c2
-rw-r--r--src/or/rendservice.c19
2 files changed, 5 insertions, 16 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 28c70ad22c..69d0f76a1a 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1766,12 +1766,12 @@ circuit_launch_by_extend_info(uint8_t purpose,
switch (purpose) {
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
- case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO:
/* it's ready right now */
break;
case CIRCUIT_PURPOSE_C_INTRODUCING:
case CIRCUIT_PURPOSE_S_CONNECT_REND:
case CIRCUIT_PURPOSE_C_GENERAL:
+ case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO:
/* need to add a new hop */
tor_assert(extend_info);
if (circuit_extend_to_new_exit(circ, extend_info) < 0)
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index c857d4cc87..89f95d7a00 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -2765,21 +2765,10 @@ rend_service_launch_establish_intro(rend_service_t *service,
safe_str_client(extend_info_describe(intro->extend_info)));
return -1;
}
-
- if (tor_memneq(intro->extend_info->identity_digest,
- launched->build_state->chosen_exit->identity_digest, DIGEST_LEN)) {
- char cann[HEX_DIGEST_LEN+1], orig[HEX_DIGEST_LEN+1];
- base16_encode(cann, sizeof(cann),
- launched->build_state->chosen_exit->identity_digest,
- DIGEST_LEN);
- base16_encode(orig, sizeof(orig),
- intro->extend_info->identity_digest, DIGEST_LEN);
- log_info(LD_REND, "The intro circuit we just cannibalized ends at $%s, "
- "but we requested an intro circuit to $%s. Updating "
- "our service.", cann, orig);
- extend_info_free(intro->extend_info);
- intro->extend_info = extend_info_dup(launched->build_state->chosen_exit);
- }
+ /* We must have the same exit node even if cannibalized. */
+ tor_assert(tor_memeq(intro->extend_info->identity_digest,
+ launched->build_state->chosen_exit->identity_digest,
+ DIGEST_LEN));
launched->rend_data = rend_data_service_create(service->service_id,
service->pk_digest, NULL,