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

[tor-commits] [tor/master] Merge remote-tracking branch 'public/ticket20001_v2'



commit ed5d2daba1944d7910b991475763376162b31af9
Merge: 9733784 8fdf2f5
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Sep 26 11:01:10 2016 -0700

    Merge remote-tracking branch 'public/ticket20001_v2'

 changes/ticket20001  |  6 ++++++
 src/or/routerparse.c |  9 ++++++++-
 src/or/routerparse.h |  8 ++++++++
 src/test/test_dir.c  | 44 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 1 deletion(-)

diff --cc src/or/routerparse.c
index d5690c1,b1d9a85..db3d004
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@@ -2904,23 -2876,20 +2905,29 @@@ routerstatus_parse_entry_from_string(me
          rs->is_v2_dir = 1;
        }
      }
+     /* These are implied true by having been included in a consensus made
+      * with a given method */
+     rs->is_flagged_running = 1; /* Starting with consensus method 4. */
+     if (consensus_method >= MIN_METHOD_FOR_EXCLUDING_INVALID_NODES)
+       rs->is_valid = 1;
+ 
    }
 +  int found_protocol_list = 0;
 +  if ((tok = find_opt_by_keyword(tokens, K_PROTO))) {
 +    found_protocol_list = 1;
 +    rs->protocols_known = 1;
 +    rs->supports_extend2_cells =
 +      protocol_list_supports_protocol(tok->args[0], PRT_RELAY, 2);
 +  }
    if ((tok = find_opt_by_keyword(tokens, K_V))) {
      tor_assert(tok->n_args == 1);
 -    rs->version_known = 1;
 -    if (strcmpstart(tok->args[0], "Tor ")) {
 -    } else {
 -      rs->version_supports_extend2_cells =
 +    if (!strcmpstart(tok->args[0], "Tor ") && !found_protocol_list) {
 +      /* We only do version checks like this in the case where
 +       * the version is a "Tor" version, and where there is no
 +       * list of protocol versions that we should be looking at instead. */
 +      rs->supports_extend2_cells =
          tor_version_as_new_as(tok->args[0], "0.2.4.8-alpha");
 +      rs->protocols_known = 1;
      }
      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