From 1f4b6944c06fce5befc3b8a21d252ba946632f63 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 22 Jun 2011 12:27:27 -0400 Subject: Upload descriptors more often when recent desc is unlisted Right now we only force a new descriptor upload every 18 hours. This can make servers become unlisted if they upload a descriptor at time T which the authorities reject as being "too similar" to one they uploaded before. Nothing will actually make the server upload a new descriptor later on, until another 18 hours have passed. This patch changes the upload behavior so that the 18 hour interval applies only when we're listed in a live consensus with a descriptor published within the last 18 hours. Otherwise--if we're not listed in the live consensus, or if we're listed with a publication time over 18 hours in the past--we upload a new descriptor every 90 minutes. This is an attempted bugfix for #3327. If we merge it, it should obsolete #535. --- src/or/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/or/main.c') diff --git a/src/or/main.c b/src/or/main.c index 2cdbe71f10..af769c412b 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1326,11 +1326,7 @@ run_scheduled_events(time_t now) time_to_check_ipaddress = now + CHECK_IPADDRESS_INTERVAL; check_descriptor_ipaddress_changed(now); } -/** If our router descriptor ever goes this long without being regenerated - * because something changed, we force an immediate regenerate-and-upload. */ -#define FORCE_REGENERATE_DESCRIPTOR_INTERVAL (18*60*60) - mark_my_descriptor_dirty_if_older_than( - now - FORCE_REGENERATE_DESCRIPTOR_INTERVAL); + mark_my_descriptor_dirty_if_too_old(now); consider_publishable_server(0); /* also, check religiously for reachability, if it's within the first * 20 minutes of our uptime. */ -- cgit v1.2.3-54-g00ecf