diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:31:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:31:57 -0400 |
commit | 34e4122025791d1a607426e5e543d6312872b9dd (patch) | |
tree | 975c1dc949d81ed7a76f50726a49d4aa8e67533e /src/or/routerparse.c | |
parent | 649104fdb950057288a5e7b48f402d563546b83b (diff) | |
parent | 2f17743d6f7222cf96250890dd91d6689b2d55c6 (diff) | |
download | tor-34e4122025791d1a607426e5e543d6312872b9dd.tar.gz tor-34e4122025791d1a607426e5e543d6312872b9dd.zip |
Merge branch 'ticket20657_nickm_bugfixes_squashed'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 8823c0b53e..3449e6f6b5 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2706,7 +2706,8 @@ routerstatus_parse_entry_from_string(memarea_t *area, rs->supports_ed25519_hs_intro = protocol_list_supports_protocol(tok->args[0], PRT_HSINTRO, 4); rs->supports_v3_hsdir = - protocol_list_supports_protocol(tok->args[0], PRT_HSDIR, 2); + protocol_list_supports_protocol(tok->args[0], PRT_HSDIR, + PROTOVER_HSDIR_V3); } if ((tok = find_opt_by_keyword(tokens, K_V))) { tor_assert(tok->n_args == 1); @@ -2718,6 +2719,12 @@ 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. */ + if (!tor_version_as_new_as(tok->args[0], "0.3.0.8")) { + rs->supports_v3_hsdir = 0; + } + } if (vote_rs) { vote_rs->version = tor_strdup(tok->args[0]); } |