]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only authorities should automatically download v2 networkstatus documents
authorNick Mathewson <nickm@torproject.org>
Thu, 28 Apr 2011 14:05:32 +0000 (10:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 29 Apr 2011 01:06:07 +0000 (21:06 -0400)
Clients and relays haven't used them since early 0.2.0.x.  The only
remaining use by authorities learning about new relays ahead of scedule;
see proposal 147 for what we intend to do about that.

We're leaving in an option (FetchV2Networkstatus) to manually fetch v2
networkstatuses, because apparently dnsel and maybe bwauth want them.

This fixes bug 3022.

changes/bug3022 [new file with mode: 0644]
doc/tor.1.txt
src/or/config.c
src/or/directory.c
src/or/networkstatus.c
src/or/or.h

diff --git a/changes/bug3022 b/changes/bug3022
new file mode 100644 (file)
index 0000000..9472e6d
--- /dev/null
@@ -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.
+
index 04a05377120d387f95252ee8ef5d3160c30a63c8..c408aa9a73edf9f25642908406a84a183daeb6bd 100644 (file)
@@ -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
 ----------------------------------
 
index f003e4d296e397fbfcdd35a886ed00a7c83b6ba3..ab9c5db337944de7f88236eb74ff8384f2ce0aaf 100644 (file)
@@ -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
index 0c095fe871e722a4a699503af0581811139249bd..68734e60426a7fc2cb155c2fe04f1a82c72b4d51 100644 (file)
@@ -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 :
index 4f6fe15409bb3f3dd42f4f7e727fd072ae2ecc2d..a50d3ca070cfdda4648830c50e18e8ff6035140a 100644 (file)
@@ -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);
index 7d354c8fe1763be6c97519deaf7e242e0dfc5f9b..30179e5db01a48dfc93fa0b899b7b6ddd05dce0b 100644 (file)
@@ -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