diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2008-06-10 23:31:55 +0000 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2008-06-10 23:31:55 +0000 |
commit | 33f846b313b3cf3191e3a9a54ec1c97227393d3d (patch) | |
tree | 77c004c37d0c44aa7f6761159a9fcc85d46bd989 /src/or/rendservice.c | |
parent | 15680ce8d23309a42643fa145088be21c11835d1 (diff) | |
download | tor-33f846b313b3cf3191e3a9a54ec1c97227393d3d.tar.gz tor-33f846b313b3cf3191e3a9a54ec1c97227393d3d.zip |
In very rare situations new hidden service descriptors were published earlier than 30 seconds after the last change to the service, with the 30 seconds being the current voodoo saying that a descriptor is stable.
svn:r15113
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 21163cf0c2..bf5eb3889a 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1335,8 +1335,10 @@ rend_consider_services_upload(time_t now) for (i=0; i < smartlist_len(rend_service_list); ++i) { service = smartlist_get(rend_service_list, i); if (!service->next_upload_time) { /* never been uploaded yet */ + /* The fixed lower bound of 30 seconds ensures that the descriptor + * is stable before being published. See comment below. */ service->next_upload_time = - now + crypto_rand_int(2*rendpostperiod); + now + 30 + crypto_rand_int(2*rendpostperiod); } if (service->next_upload_time < now || (service->desc_is_dirty && |