mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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.
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user