[tor-commits] [tor/master] Reject Tor relays running the 0.4.1 series

nickm at torproject.org nickm at torproject.org
Mon Jul 6 13:34:22 UTC 2020


commit 7cf031a0ccb29cef622b72821184e60eb3f41f81
Author: Neel Chauhan <neel at neelc.org>
Date:   Wed Jun 17 11:17:40 2020 -0700

    Reject Tor relays running the 0.4.1 series
---
 changes/bug34357                    | 4 ++++
 src/feature/dirauth/process_descs.c | 8 ++++----
 src/test/test_process_descs.c       | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/changes/bug34357 b/changes/bug34357
new file mode 100644
index 000000000..69fada7cc
--- /dev/null
+++ b/changes/bug34357
@@ -0,0 +1,4 @@
+  o Minor features (directory authorities):
+    - Directory authorities now reject descriptors from relays running
+      Tor versions from the 0.4.1 series, but still allow the 0.3.5
+      series. Resolves ticket 34357. Patch by Neel Chauhan.
diff --git a/src/feature/dirauth/process_descs.c b/src/feature/dirauth/process_descs.c
index 5025d0ae3..bc659d032 100644
--- a/src/feature/dirauth/process_descs.c
+++ b/src/feature/dirauth/process_descs.c
@@ -409,11 +409,11 @@ dirserv_rejects_tor_version(const char *platform,
     return true;
   }
 
-  /* Series between Tor 0.3.6 and 0.4.1.4-rc inclusive are unsupported.
-   * Reject them. 0.3.6.0-alpha-dev only existed for a short time, before
-   * it was renamed to 0.4.0.0-alpha-dev. */
+  /* Series between Tor 0.3.6 and 0.4.1 inclusive are unsupported. Reject
+   * them. 0.3.6.0-alpha-dev only existed for a short time, before it was
+   * renamed to 0.4.0.0-alpha-dev. */
   if (tor_version_as_new_as(platform,"0.3.6.0-alpha-dev") &&
-      !tor_version_as_new_as(platform,"0.4.1.5")) {
+      !tor_version_as_new_as(platform,"0.4.2.1-alpha")) {
     if (msg) {
       *msg = please_upgrade_string;
     }
diff --git a/src/test/test_process_descs.c b/src/test/test_process_descs.c
index 14865cff1..5c2301f87 100644
--- a/src/test/test_process_descs.c
+++ b/src/test/test_process_descs.c
@@ -38,10 +38,10 @@ test_process_descs_versions(void *arg)
     { "Tor 0.4.0.5", true },
     { "Tor 0.4.1.1-alpha", true },
     { "Tor 0.4.1.4-rc", true },
+    { "Tor 0.4.1.5", true },
     // new enough to be supported
     { "Tor 0.3.5.7", false },
     { "Tor 0.3.5.8", false },
-    { "Tor 0.4.1.5", false },
     { "Tor 0.4.2.1-alpha", false },
     { "Tor 0.4.2.4-rc", false },
     { "Tor 0.4.3.0-alpha-dev", false },





More information about the tor-commits mailing list