summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-18 13:56:22 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-18 13:56:22 -0400
commit1e441df2d0d06aa66eaf2c0e00a42d7fe9c39c87 (patch)
tree2ce8d5401d7e3cb25f1e58dcbaf3ff578bb2c9cf /src/or/routerparse.c
parentba5d75810493f237edbb7f4f149d61f1ca08e605 (diff)
downloadtor-1e441df2d0d06aa66eaf2c0e00a42d7fe9c39c87.tar.gz
tor-1e441df2d0d06aa66eaf2c0e00a42d7fe9c39c87.zip
Only use optimistic data with exits that support it
This adds a little code complexity: we need to remember for each node whether it supports the right feature, and then check for each connection whether it's exiting at such a node. We store this in a flag in the edge_connection_t, and set that flag at link time.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d1b2cd0fb7..5f160d054e 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2092,6 +2092,7 @@ routerstatus_parse_entry_from_string(memarea_t *area,
rs->version_supports_extrainfo_upload = 1;
rs->version_supports_conditional_consensus = 1;
rs->version_supports_microdesc_cache = 1;
+ rs->version_supports_optimistic_data = 1;
} else {
rs->version_supports_begindir =
tor_version_as_new_as(tok->args[0], "0.2.0.1-alpha");
@@ -2109,6 +2110,8 @@ routerstatus_parse_entry_from_string(memarea_t *area,
*/
rs->version_supports_microdesc_cache =
tor_version_as_new_as(tok->args[0], "0.2.3.0-alpha");
+ rs->version_supports_optimistic_data =
+ tor_version_as_new_as(tok->args[0], "0.2.3.1-alpha");
}
if (vote_rs) {
vote_rs->version = tor_strdup(tok->args[0]);