aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2008-07-10 21:02:01 +0000
committerKarsten Loesing <karsten.loesing@gmx.net>2008-07-10 21:02:01 +0000
commit9231858ff54d9c8eda671bf9fe69f019b136f35d (patch)
tree7ff1c5a3d33fbc2e109748d7337ad721a934a0b7 /src
parentcb7cc9e12d66907343e1522e7128de206c0dc86f (diff)
downloadtor-9231858ff54d9c8eda671bf9fe69f019b136f35d.tar
tor-9231858ff54d9c8eda671bf9fe69f019b136f35d.tar.gz
Fix bug 763. When a hidden service is giving up on an introduction point candidate that was not included in the last published rendezvous descriptor, don't reschedule publication of the next descriptor.
svn:r15825
Diffstat (limited to 'src')
-rw-r--r--src/common/tortls.c2
-rw-r--r--src/or/rendservice.c23
2 files changed, 21 insertions, 4 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index d2751d165..67c68fe6d 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -564,7 +564,7 @@ tor_tls_context_new(crypto_pk_env_t *identity, unsigned int key_lifetime)
SSL_CTX_set_options(result->ctx, SSL_OP_NO_SSLv2);
#endif
SSL_CTX_set_options(result->ctx, SSL_OP_SINGLE_DH_USE);
-
+
#ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
SSL_CTX_set_options(result->ctx,
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index b38d73e1c..1965b1285 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1256,14 +1256,31 @@ rend_services_introduce(void)
for (j=0; j < smartlist_len(service->intro_nodes); ++j) {
intro = smartlist_get(service->intro_nodes, j);
router = router_get_by_digest(intro->extend_info->identity_digest);
- if (!router || !find_intro_circuit(intro, service->pk_digest,
- service->descriptor_version)) {
+ if (!router) {
+ log_warn(LD_BUG, "We have picked router %s as introduction point, "
+ "but we don't have its router descriptor. Skipping.",
+ intro->extend_info->nickname);
+ continue;
+ }
+ if (!find_intro_circuit(intro, service->pk_digest,
+ service->descriptor_version)) {
log_info(LD_REND,"Giving up on %s as intro point for %s.",
intro->extend_info->nickname, service->service_id);
+ if (service->desc) {
+ SMARTLIST_FOREACH(service->desc->intro_nodes, rend_intro_point_t *,
+ dintro, {
+ if (!memcmp(dintro->extend_info->identity_digest,
+ intro->extend_info->identity_digest, DIGEST_LEN)) {
+ log_info(LD_REND, "The intro point we are giving up on was "
+ "included in the last published descriptor. "
+ "Marking current descriptor as dirty.");
+ service->desc_is_dirty = now;
+ }
+ });
+ }
rend_intro_point_free(intro);
smartlist_del(service->intro_nodes,j--);
changed = 1;
- service->desc_is_dirty = now;
}
smartlist_add(intro_routers, router);
}