summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2008-06-17 17:10:03 +0000
committerKarsten Loesing <karsten.loesing@gmx.net>2008-06-17 17:10:03 +0000
commit693d7e3e359fc9c00c1e2492979a0387c50010c6 (patch)
tree75f2e922ea4ac61ae300d5a3259ba1c40869fab9 /src/or
parent1ad83d74b1a52828eefb7b871644d5550fd7c531 (diff)
downloadtor-693d7e3e359fc9c00c1e2492979a0387c50010c6.tar.gz
tor-693d7e3e359fc9c00c1e2492979a0387c50010c6.zip
When establishing a hidden service, introduction points that originate from cannibalized circuits are completely ignored and not included in rendezvous service descriptors. Bugfix on 0.2.0.14-alpha. Backport candidate.
svn:r15332
Diffstat (limited to 'src/or')
-rw-r--r--src/or/rendservice.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index f5009185e0..641153410e 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -797,6 +797,22 @@ rend_service_launch_establish_intro(rend_service_t *service,
escaped_safe_str(intro->extend_info->nickname));
return -1;
}
+
+ if (memcmp(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);
+ tor_free(intro->extend_info);
+ intro->extend_info = extend_info_dup(launched->build_state->chosen_exit);
+ }
+
strlcpy(launched->rend_query, service->service_id,
sizeof(launched->rend_query));
memcpy(launched->rend_pk_digest, service->pk_digest, DIGEST_LEN);