diff options
author | Roger Dingledine <arma@torproject.org> | 2006-01-03 23:34:42 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-01-03 23:34:42 +0000 |
commit | 6b2a6a82396f5ccf068a9a5157c6fa5a8b1a1830 (patch) | |
tree | 73d432368fc674fc351ae8689bf132ce46131054 | |
parent | d10f2b726769ed22e6ead8a58ead9e5c4f645f8c (diff) | |
download | tor-6b2a6a82396f5ccf068a9a5157c6fa5a8b1a1830.tar.gz tor-6b2a6a82396f5ccf068a9a5157c6fa5a8b1a1830.zip |
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
-rw-r--r-- | src/or/router.c | 7 |
1 files changed, 6 insertions, 1 deletions
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). <b>force</b> 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); |