diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-03 02:37:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-03 02:37:52 +0000 |
commit | 9e8ae9766e5d4eb94972f2e7118ce8e9c2e09381 (patch) | |
tree | 0f3716d7dcda024edbec69a67827609dfe19299d /src/or/routerlist.c | |
parent | 5e74ce8d57e0de041480db99ffb11c4a90249355 (diff) | |
download | tor-9e8ae9766e5d4eb94972f2e7118ce8e9c2e09381.tar tor-9e8ae9766e5d4eb94972f2e7118ce8e9c2e09381.tar.gz |
Only check versions against downloaded directories, not cached directories.
svn:r2413
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 7f8261595..f0756b3e0 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -65,7 +65,7 @@ int router_reload_router_list(void) s = read_file_to_str(filename,0); if (s) { log_fn(LOG_INFO, "Loading cached directory from %s", filename); - if (router_load_routerlist_from_directory(s, NULL) < 0) { + if (router_load_routerlist_from_directory(s, NULL, 0) < 0) { log_fn(LOG_WARN, "Cached directory '%s' was unparseable; ignoring.", filename); } if(routerlist->published_on > time(NULL) - OLD_MIN_ONION_KEY_LIFETIME/2) { @@ -793,10 +793,12 @@ int router_load_routerlist_from_string(const char *s, int trusted) * signed directory <b>s</b>. If pkey is provided, check the signature against * pkey; else check against the pkey of the signing directory server. */ int router_load_routerlist_from_directory(const char *s, - crypto_pk_env_t *pkey) + crypto_pk_env_t *pkey, + int check_version) { routerlist_t *new_list = NULL; - if (router_parse_routerlist_from_directory(s, &new_list, pkey)) { + if (router_parse_routerlist_from_directory(s, &new_list, pkey, + check_version)) { log_fn(LOG_WARN, "Couldn't parse directory."); return -1; } |