[or-cvs] r15825: Fix bug 763. When a hidden service is giving up on an introd (in tor/trunk: . src/common src/or)
kloesing at seul.org
kloesing at seul.org
Thu Jul 10 21:02:01 UTC 2008
Author: kloesing
Date: 2008-07-10 17:02:01 -0400 (Thu, 10 Jul 2008)
New Revision: 15825
Modified:
tor/trunk/ChangeLog
tor/trunk/src/common/tortls.c
tor/trunk/src/or/rendservice.c
Log:
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.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-07-10 19:55:05 UTC (rev 15824)
+++ tor/trunk/ChangeLog 2008-07-10 21:02:01 UTC (rev 15825)
@@ -16,6 +16,10 @@
- Stop using __attribute__((nonnull)) with GCC: it can give us useful
warnings (occasionally), but it can also cause the compiler to
eliminate error-checking code. Suggested by Peter Gutmann.
+ - 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. Fixes bug 763.
+ Bugfix on 0.0.9.3.
Changes in version 0.2.0.29-rc - 2008-07-08
Modified: tor/trunk/src/common/tortls.c
===================================================================
--- tor/trunk/src/common/tortls.c 2008-07-10 19:55:05 UTC (rev 15824)
+++ tor/trunk/src/common/tortls.c 2008-07-10 21:02:01 UTC (rev 15825)
@@ -564,7 +564,7 @@
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);
Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c 2008-07-10 19:55:05 UTC (rev 15824)
+++ tor/trunk/src/or/rendservice.c 2008-07-10 21:02:01 UTC (rev 15825)
@@ -1256,14 +1256,31 @@
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);
}
More information about the tor-commits
mailing list