aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-31 11:25:29 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-31 11:25:29 -0500
commit23054543278a8ee5db6d8dae3b3a96e2b2fd5377 (patch)
tree87510491013834371d243fff4d7312baf729c327 /src/or/routerparse.c
parent48424772aa9a7b3ed4710471a205a841d69337bd (diff)
parentb1ee1927b124aa63d91cdc8feda7fb7e3d4bd05f (diff)
downloadtor-23054543278a8ee5db6d8dae3b3a96e2b2fd5377.tar.gz
tor-23054543278a8ee5db6d8dae3b3a96e2b2fd5377.zip
Merge remote-tracking branch 'arma/bug4013'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 7a0fd17c21..28ec9452ca 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2125,14 +2125,8 @@ routerstatus_parse_entry_from_string(memarea_t *area,
tor_version_as_new_as(tok->args[0], "0.2.0.8-alpha");
rs->version_supports_conditional_consensus =
tor_version_as_new_as(tok->args[0], "0.2.1.1-alpha");
- /* XXXX023 NM microdescs: 0.2.3.1-alpha isn't widely used yet, but
- * not all 0.2.3.0-alpha "versions" actually support microdesc cacheing
- * right. There's a compromise here. Since this is 5 May, let's
- * err on the side of having some possible caches to use. Once more
- * caches are running 0.2.3.1-alpha, we can bump this version number.
- */
rs->version_supports_microdesc_cache =
- tor_version_as_new_as(tok->args[0], "0.2.3.0-alpha");
+ tor_version_supports_microdescriptors(tok->args[0]);
rs->version_supports_optimistic_data =
tor_version_as_new_as(tok->args[0], "0.2.3.1-alpha");
}
@@ -4431,6 +4425,13 @@ microdescs_parse_from_string(const char *s, const char *eos,
return result;
}
+/** Return true iff this Tor version can answer directory questions
+ * about microdescriptors. */
+int tor_version_supports_microdescriptors(const char *platform)
+{
+ return tor_version_as_new_as(platform, "0.2.3.1-alpha");
+}
+
/** Parse the Tor version of the platform string <b>platform</b>,
* and compare it to the version in <b>cutoff</b>. Return 1 if
* the router is at least as new as the cutoff, else return 0.