[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] prop224: HSDir v3 support is >= 0.3.0.8



commit 85c80adf4a75e1f44250379a4806796a26e861e3
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Fri Jul 14 16:37:13 2017 -0400

    prop224: HSDir v3 support is >= 0.3.0.8
    
    Because of bug #22447, we have to select nodes that are at least this version.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/or/nodelist.c    | 5 +++++
 src/or/routerparse.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 117598cf1..1666fffb7 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -55,6 +55,7 @@
 #include "rendservice.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 #include "routerset.h"
 #include "torcert.h"
 
@@ -797,6 +798,10 @@ node_supports_v3_hsdir(const node_t *node)
     if (node->ri->protocol_list == NULL) {
       return 0;
     }
+    if (node->ri->platform) {
+      /* Bug #22447 forces us to filter on this version. */
+      return tor_version_as_new_as(node->ri->platform, "0.3.0.8");
+    }
     return protocol_list_supports_protocol(node->ri->protocol_list,
                                            PRT_HSDIR, PROTOVER_HSDIR_V3);
   }
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index f4e87a00d..ec63aef4d 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2718,6 +2718,11 @@ routerstatus_parse_entry_from_string(memarea_t *area,
         tor_version_as_new_as(tok->args[0], "0.2.4.8-alpha");
       rs->protocols_known = 1;
     }
+    if (!strcmpstart(tok->args[0], "Tor ") && found_protocol_list) {
+      /* Bug #22447 forces us to filter on this version. */
+      rs->supports_v3_hsdir =
+        tor_version_as_new_as(tok->args[0], "0.3.0.8");
+    }
     if (vote_rs) {
       vote_rs->version = tor_strdup(tok->args[0]);
     }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits