summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-26 11:01:10 -0700
committerNick Mathewson <nickm@torproject.org>2016-09-26 11:01:10 -0700
commited5d2daba1944d7910b991475763376162b31af9 (patch)
tree581ff9baaed0a19d328a89eca3e88130d56953b6 /src/or/routerparse.c
parent97337844b7282946dda12f59bcabc097fad42647 (diff)
parent8fdf2f583c73f249791bd3a7627d27da4a6ef36f (diff)
downloadtor-ed5d2daba1944d7910b991475763376162b31af9.tar.gz
tor-ed5d2daba1944d7910b991475763376162b31af9.zip
Merge remote-tracking branch 'public/ticket20001_v2'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d5690c1101..db3d004f26 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2760,7 +2760,7 @@ routerstatus_parse_guardfraction(const char *guardfraction_str,
*
* Parse according to the syntax used by the consensus flavor <b>flav</b>.
**/
-static routerstatus_t *
+STATIC routerstatus_t *
routerstatus_parse_entry_from_string(memarea_t *area,
const char **s, smartlist_t *tokens,
networkstatus_t *vote,
@@ -2874,6 +2874,7 @@ routerstatus_parse_entry_from_string(memarea_t *area,
}
}
} else if (tok) {
+ /* This is a consensus, not a vote. */
int i;
for (i=0; i < tok->n_args; ++i) {
if (!strcmp(tok->args[i], "Exit"))
@@ -2904,6 +2905,12 @@ routerstatus_parse_entry_from_string(memarea_t *area,
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))) {