aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.h
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-01-25 18:54:59 -0500
committerRoger Dingledine <arma@torproject.org>2012-01-25 18:54:59 -0500
commita0f0897795c45d22ad2d2dde98c81195a9db24dc (patch)
tree715f4ce9819073bca879b40f01c7030a7b4bc603 /src/or/routerparse.h
parent247a21379af1cf90896d9818cf448d9687f6277c (diff)
downloadtor-a0f0897795c45d22ad2d2dde98c81195a9db24dc.tar
tor-a0f0897795c45d22ad2d2dde98c81195a9db24dc.tar.gz
Allow 0.2.3.x clients to use 0.2.2.x bridges.
Previously the client would ask the bridge for microdescriptors, which are only supported in 0.2.3.x and later, and then fail to bootstrap when it didn't get the answers it wanted. Fixes bug 4013; bugfix on 0.2.3.2-alpha. The fix here is to revert to using normal descriptors if any of our bridges are known to not support microdescs. This is not ideal, a) because we'll start downloading a microdesc consensus as soon as we get a bridge descriptor, and that will waste time if we later get a bridge descriptor that tells us we don't like microdescriptors; and b) by changing our mind we're leaking to our other bridges that we have an old-version bridge. The alternate fix would have been to change we_use_microdescriptors_for_circuits() to ask if *any* of our bridges can support microdescriptors, and then change the directory logic that picks a bridge to only select from those that do. For people living in the future, where 0.2.2.x is obsolete, there won't be a difference. Note that in either of these potential fixes, we have risk of oscillation if our one funny-looking bridges goes away / comes back.
Diffstat (limited to 'src/or/routerparse.h')
-rw-r--r--src/or/routerparse.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerparse.h b/src/or/routerparse.h
index 65f6c4241..b274d2196 100644
--- a/src/or/routerparse.h
+++ b/src/or/routerparse.h
@@ -44,8 +44,9 @@ addr_policy_t *router_parse_addr_policy_item_from_string(const char *s,
int assume_action);
version_status_t tor_version_is_obsolete(const char *myversion,
const char *versionlist);
-int tor_version_parse(const char *s, tor_version_t *out);
+int tor_version_supports_microdescriptors(const char *platform);
int tor_version_as_new_as(const char *platform, const char *cutoff);
+int tor_version_parse(const char *s, tor_version_t *out);
int tor_version_compare(tor_version_t *a, tor_version_t *b);
int tor_version_same_series(tor_version_t *a, tor_version_t *b);
void sort_version_list(smartlist_t *lst, int remove_duplicates);