From 6b2a6a82396f5ccf068a9a5157c6fa5a8b1a1830 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 3 Jan 2006 23:34:42 +0000 Subject: [PATCH] Bugfix: dyndns tor servers were needing to wait 18 hours before they could start doing reachability testing using the new IP address and ports. This is because we were using the internal descriptor to learn what to test, yet we were only rebuilding the descriptor once we decided we were reachable. svn:r5723 --- src/or/router.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/or/router.c b/src/or/router.c index 702e171b66..1dc6aebc0b 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -579,13 +579,18 @@ decide_if_publishable_server(time_t now) /** Initiate server descriptor upload as reasonable (if server is publishable, * etc). force is as for router_upload_dir_desc_to_dirservers. + * + * We need to rebuild the descriptor if it's dirty even if we're not + * uploading, because our reachability testing *uses* our descriptor to + * determine what IP address and ports to test. */ void consider_publishable_server(time_t now, int force) { + int rebuilt = router_rebuild_descriptor(0); if (decide_if_publishable_server(now)) { set_server_advertised(1); - if (router_rebuild_descriptor(0) == 0) + if (rebuilt == 0) router_upload_dir_desc_to_dirservers(force); } else { set_server_advertised(0);