summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2008-08-04 23:35:12 +0000
committerKarsten Loesing <karsten.loesing@gmx.net>2008-08-04 23:35:12 +0000
commit1fe07f66f470e39fa9138402be4f2c32b1faca60 (patch)
tree6c17913f4d6f1a4d64d33ec6253886104e57fb9f /src/or
parentff9c3c006f717c7ae1135416e100078b793e664c (diff)
downloadtor-1fe07f66f470e39fa9138402be4f2c32b1faca60.tar.gz
tor-1fe07f66f470e39fa9138402be4f2c32b1faca60.zip
In some edge cases it occurs that the router descriptor of a previously picked introduction point becomes obsolete. In that case, don't stick to using that introduction point, but simply give up on it. Reverts some part of r15825.
svn:r16404
Diffstat (limited to 'src/or')
-rw-r--r--src/or/rendservice.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 61736f5e0a..6cf4d591a2 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1228,14 +1228,8 @@ 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) {
- 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)) {
+ if (!router || !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) {
@@ -1254,7 +1248,8 @@ rend_services_introduce(void)
smartlist_del(service->intro_nodes,j--);
changed = 1;
}
- smartlist_add(intro_routers, router);
+ if (router)
+ smartlist_add(intro_routers, router);
}
/* We have enough intro points, and the intro points we thought we had were