diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-09 13:37:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-09 13:37:56 -0400 |
commit | 09d7af7789d1b5cd1fdad59fc7eafa7748b4bb57 (patch) | |
tree | 09125cf5f4fb3e20709d6c39f78e419791db67d7 | |
parent | 0b3166fffa0e5e19c63fd95538f87d634444d28c (diff) | |
parent | cd42ae71850985ed8dd34ae73dc6265a643fcb13 (diff) | |
download | tor-09d7af7789d1b5cd1fdad59fc7eafa7748b4bb57.tar.gz tor-09d7af7789d1b5cd1fdad59fc7eafa7748b4bb57.zip |
Merge remote-tracking branch 'public/bug3022_v2' into maint-0.2.2
-rw-r--r-- | changes/bug3022 | 6 | ||||
-rw-r--r-- | doc/tor.1.txt | 6 | ||||
-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 |
6 files changed, 18 insertions, 2 deletions
diff --git a/changes/bug3022 b/changes/bug3022 new file mode 100644 index 0000000000..9472e6d196 --- /dev/null +++ b/changes/bug3022 @@ -0,0 +1,6 @@ + o Removed features + - Caches no longer download and serve v2 networkstatus documents + unless FetchV2Networkstatus flag is set: these documents haven't + haven't been used by clients or relays since 0.2.0.x. Resolves + bug 3022. + diff --git a/doc/tor.1.txt b/doc/tor.1.txt index 030f1cf32e..00d5066d0a 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -1171,6 +1171,12 @@ if DirPort is non-zero): Set an entrance policy for this server, to limit who can connect to the directory ports. The policies have the same form as exit policies above. +**FetchV2Networkstatus** **0**|**1**:: + If set, we try to fetch the (obsolete, unused) version 2 network status + consensus documents from the directory authorities. No currently + supported Tor version uses them. (Default: 0.) + + DIRECTORY AUTHORITY SERVER OPTIONS ---------------------------------- diff --git a/src/or/config.c b/src/or/config.c index 666a1bdc34..34208e85bf 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -255,6 +255,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 0c095fe871..68734e6042 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -353,6 +353,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose, break; case DIR_PURPOSE_FETCH_V2_NETWORKSTATUS: type = V2_AUTHORITY; + prefer_authority = 1; /* Only v2 authorities have these anyway. */ break; case DIR_PURPOSE_FETCH_SERVERDESC: type = (router_purpose == ROUTER_PURPOSE_BRIDGE ? BRIDGE_AUTHORITY : diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 4f6fe15409..a50d3ca070 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1356,7 +1356,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 f693ad908c..d667358eb0 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2489,7 +2489,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 |