aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-15 16:17:59 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-15 16:17:59 +0000
commit7a8ac5dfef401fa26e37dcfd2b2a8ccb4285613b (patch)
tree03bd4754f9dfc882aeaf49fa3608ec6d7b1d9292 /src/or/routerparse.c
parent39f39b0c17cd1d7677d762529476b82f12b6c6a3 (diff)
downloadtor-7a8ac5dfef401fa26e37dcfd2b2a8ccb4285613b.tar.gz
tor-7a8ac5dfef401fa26e37dcfd2b2a8ccb4285613b.zip
Tweak on patch to make authoritative directory servers cache
directories on disk. Make authdirservers cache *their own* directories instead of the ones they download. This gives better liveness, and marginally better resistance to broken authdirservers. Authdirservers don't cache running-routers at all: r-r isn't stored to disk, so there's no point right now. svn:r2893
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 5c2cd28f82..ca7d6ed5d3 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -389,7 +389,8 @@ router_parse_routerlist_from_directory(const char *str,
/* Now that we know the signature is okay, and we have a
* publication time, cache the directory. */
- dirserv_set_cached_directory(str, published_on, 0);
+ if (!get_options()->AuthoritativeDir)
+ dirserv_set_cached_directory(str, published_on, 0);
if (!(tok = find_first_by_keyword(tokens, K_RECOMMENDED_SOFTWARE))) {
log_fn(LOG_WARN, "Missing recommended-software line from directory.");
@@ -515,7 +516,8 @@ router_parse_runningrouters(const char *str)
/* Now that we know the signature is okay, and we have a
* publication time, cache the list. */
- dirserv_set_cached_directory(str, published_on, 1);
+ if (!get_options()->AuthoritativeDir)
+ dirserv_set_cached_directory(str, published_on, 1);
if (!(tok = find_first_by_keyword(tokens, K_ROUTER_STATUS))) {
if (!(tok = find_first_by_keyword(tokens, K_RUNNING_ROUTERS))) {