Inaccuracies in Rendezvous Descriptor Upload Logic
The current logic for publishing a rendezvous service descriptor is to wait for 30 seconds after the last change to the set of introduction points. However, in an evaluation it was found that in some test cases these 30 seconds were exceeded: In one test case, there was a 34 seconds gap inbetween two introduction establishments, but without an attempt to upload a descriptor. In another case, a descriptor was not uploaded until 41 seconds after an introduction point establishment.
An inspection of the log files revealed that the abandoning of an introduction point candidate resets the 30-seconds counter, too, even though it would have no effect on the uploaded descriptor. Hence, given that the 30-seconds delay is a useful means to estimate when a descriptor is stable, the 30-seconds counter should only be reset when an actual change to the descriptor to be uploaded occurs.
A possible fix is to check whether an introduction point that is given up was contained in the last published descriptor. Only in that case, the descriptor should be marked as dirty and the 30-seconds countdown started. A bugfix is attached below. Backport candidate for 0.2.0.x.
Index: /home/karsten/tor/tor-trunk/src/or/rendservice.c
--- /home/karsten/tor/tor-trunk/src/or/rendservice.c (revision 15806) +++ /home/karsten/tor/tor-trunk/src/or/rendservice.c (working copy) @@ -1260,10 +1260,20 @@ 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 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);
[Automatically added by flyspray2trac: Operating System: All]