diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-09 13:39:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-09 13:39:51 -0400 |
commit | e6980faec43504ac32ddd96d9c2bddcccca3a21b (patch) | |
tree | aea893d8370deabe147299cb192b7967f1a7ece9 /src | |
parent | acd6a4856bccff92eb241b18066ca7df577ab5f2 (diff) | |
parent | 09d7af7789d1b5cd1fdad59fc7eafa7748b4bb57 (diff) | |
download | tor-e6980faec43504ac32ddd96d9c2bddcccca3a21b.tar.gz tor-e6980faec43504ac32ddd96d9c2bddcccca3a21b.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
src/or/directory.c
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/directory.c | 1 | ||||
-rw-r--r-- | src/or/networkstatus.c | 2 | ||||
-rw-r--r-- | src/or/or.h | 4 |
4 files changed, 6 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 09ad51f00c..5b251d382a 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -262,6 +262,7 @@ static config_var_t _option_vars[] = { V(FetchServerDescriptors, BOOL, "1"), V(FetchHidServDescriptors, BOOL, "1"), V(FetchUselessDescriptors, BOOL, "0"), + V(FetchV2Networkstatus, BOOL, "0"), #ifdef WIN32 V(GeoIPFile, FILENAME, "<default>"), #else diff --git a/src/or/directory.c b/src/or/directory.c index 145de3d750..313c6c5a40 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -363,6 +363,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose, break; case DIR_PURPOSE_FETCH_V2_NETWORKSTATUS: type = V2_DIRINFO; + prefer_authority = 1; /* Only v2 authorities have these anyway. */ break; case DIR_PURPOSE_FETCH_SERVERDESC: type = (router_purpose == ROUTER_PURPOSE_BRIDGE ? BRIDGE_DIRINFO : diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 663d1ad919..7fd3d365f4 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1365,7 +1365,7 @@ update_networkstatus_downloads(time_t now) or_options_t *options = get_options(); if (should_delay_dir_fetches(options)) return; - if (directory_fetches_dir_info_early(options)) + if (authdir_mode_any_main(options) || options->FetchV2Networkstatus) update_v2_networkstatus_cache_downloads(now); update_consensus_networkstatus_downloads(now); update_certificate_downloads(now); diff --git a/src/or/or.h b/src/or/or.h index 36ab508ca6..f58876e496 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2655,7 +2655,9 @@ typedef struct { /** Boolean: do we publish hidden service descriptors to the HS auths? */ int PublishHidServDescriptors; int FetchServerDescriptors; /**< Do we fetch server descriptors as normal? */ - int FetchHidServDescriptors; /** and hidden service descriptors? */ + int FetchHidServDescriptors; /**< and hidden service descriptors? */ + int FetchV2Networkstatus; /**< Do we fetch v2 networkstatus documents when + * we don't need to? */ int HidServDirectoryV2; /**< Do we participate in the HS DHT? */ int MinUptimeHidServDirectoryV2; /**< As directory authority, accept hidden |