summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-26 12:33:23 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-26 10:56:51 -0700
commit90a6fe318cfae4d64fff034574153b8c96895a6c (patch)
tree56ef35f16d441903f0c919fb170c8a3afe5508cf /src/or/routerparse.c
parentf33b90324abe11724f59389e1aeaf8b3e021c3af (diff)
downloadtor-90a6fe318cfae4d64fff034574153b8c96895a6c.tar.gz
tor-90a6fe318cfae4d64fff034574153b8c96895a6c.zip
Vote on 'proto' lines and include them after 'v' lines.
(Despite the increased size of the consensus, this should have approximately zero effect on the compressed consensus size, since the "proto" line should be completely implied by the "v" line.)
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 46209abcd5..9428e4560a 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -388,6 +388,7 @@ static token_rule_t rtrstatus_token_table[] = {
T01("w", K_W, ARGS, NO_OBJ ),
T0N("m", K_M, CONCAT_ARGS, NO_OBJ ),
T0N("id", K_ID, GE(2), NO_OBJ ),
+ T01("proto", K_PROTO, CONCAT_ARGS, NO_OBJ ),
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
END_OF_TABLE
};
@@ -2992,6 +2993,10 @@ routerstatus_parse_entry_from_string(memarea_t *area,
}
}
}
+ if (t->tp == K_PROTO) {
+ tor_assert(t->n_args == 1);
+ vote_rs->protocols = tor_strdup(t->args[0]);
+ }
} SMARTLIST_FOREACH_END(t);
} else if (flav == FLAV_MICRODESC) {
tok = find_opt_by_keyword(tokens, K_M);