diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-07-16 13:15:11 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-07-16 13:15:11 +0000 |
commit | bdcbd23e23c0d13be81255f815966d7607511430 (patch) | |
tree | ec842a55637029384b48400a5341ecf80e442f08 /src/or | |
parent | 301367525a09f14502a47887c3efc5428bf64afa (diff) | |
download | tor-bdcbd23e23c0d13be81255f815966d7607511430.tar tor-bdcbd23e23c0d13be81255f815966d7607511430.tar.gz |
Stop trying to detect versions of Tor on the server-side older than 0.1.1.15-rc; they simply do not work any more. Also add comment about how or_is_obsolete is a terrible field name.
svn:r15982
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuitbuild.c | 13 | ||||
-rw-r--r-- | src/or/dirserv.c | 19 | ||||
-rw-r--r-- | src/or/or.h | 4 | ||||
-rw-r--r-- | src/or/test.c | 2 |
4 files changed, 17 insertions, 21 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3071f83f1..72dcc1c2e 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -365,9 +365,7 @@ circuit_handle_first_hop(origin_circuit_t *circ) * (i.e. old or broken) and the other side will let us make a second * connection without dropping it immediately... */ if (!n_conn || n_conn->_base.state != OR_CONN_STATE_OPEN || - (n_conn->_base.or_is_obsolete && - router_digest_version_as_new_as(firsthop->extend_info->identity_digest, - "0.1.1.9-alpha-cvs"))) { + (n_conn->_base.or_is_obsolete)) { /* not currently connected */ circ->_base.n_addr = firsthop->extend_info->addr; circ->_base.n_port = firsthop->extend_info->port; @@ -551,14 +549,10 @@ should_use_create_fast_for_router(routerinfo_t *router, origin_circuit_t *circ) { or_options_t *options = get_options(); + (void) router; /* ignore the router's version. */ if (!options->FastFirstHopPK) /* create_fast is disabled */ return 0; - if (router && router->platform && - !tor_version_as_new_as(router->platform, "0.1.0.6-rc")) { - /* known not to work */ - return 0; - } if (server_mode(options) && circ->cpath->extend_info->onion_key) { /* We're a server, and we know an onion key. We can choose. * Prefer to blend in. */ @@ -762,8 +756,7 @@ circuit_extend(cell_t *cell, circuit_t *circ) * (i.e. old or broken) and the other side will let us make a second * connection without dropping it immediately... */ if (!n_conn || n_conn->_base.state != OR_CONN_STATE_OPEN || - (n_conn->_base.or_is_obsolete && - router_digest_version_as_new_as(id_digest,"0.1.1.9-alpha-cvs"))) { + n_conn->_base.or_is_obsolete) { struct in_addr in; char tmpbuf[INET_NTOA_BUF_LEN]; in.s_addr = htonl(circ->n_addr); diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 38c30001d..55a8f9edd 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -367,6 +367,15 @@ dirserv_get_status_impl(const char *id_digest, const char *nickname, strmap_size(fingerprint_list->fp_by_name), digestmap_size(fingerprint_list->status_by_digest)); + /* 0.1.1.17-rc was the first version that claimed to be stable, doesn't + * crash and drop circuits all the time, and is even vaguely compatible with + * the current network */ + if (platform && !tor_version_as_new_as(platform,"0.1.1.17-rc")) { + if (msg) + *msg = "Tor version is far too old to work."; + return FP_REJECT; + } + result = dirserv_get_name_status(id_digest, nickname); if (result & FP_NAMED) { if (should_log) @@ -437,10 +446,6 @@ dirserv_get_status_impl(const char *id_digest, const char *nickname, *msg = "Authdir rejects unknown routers."; return FP_REJECT; } - /* 0.1.0.2-rc was the first version that did enough self-testing that - * we're willing to take its word about whether it's running. */ - if (platform && !tor_version_as_new_as(platform,"0.1.0.2-rc")) - result |= FP_INVALID; } return result; @@ -2035,7 +2040,6 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, int listbadexits, int listbaddirs) { int unstable_version = - tor_version_as_new_as(ri->platform,"0.1.1.10-alpha") && !tor_version_as_new_as(ri->platform,"0.1.1.16-rc-cvs"); memset(rs, 0, sizeof(routerstatus_t)); @@ -2079,10 +2083,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, rs->is_bad_exit = listbadexits && ri->is_bad_exit; ri->is_hs_dir = dirserv_thinks_router_is_hs_dir(ri, now); rs->is_hs_dir = ri->is_hs_dir; - /* 0.1.1.9-alpha is the first version to support fetch by descriptor - * hash. */ - rs->is_v2_dir = ri->dir_port && - tor_version_as_new_as(ri->platform,"0.1.1.9-alpha"); + rs->is_v2_dir = ri->dir_port != 0; if (!strcasecmp(ri->nickname, UNNAMED_ROUTER_NICKNAME)) rs->is_named = rs->is_unnamed = 0; diff --git a/src/or/or.h b/src/or/or.h index 585964335..e53923d97 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -814,7 +814,9 @@ typedef struct connection_t { /** Edge connections only: true if we've blocked reading until the * circuit has fewer queued cells. */ unsigned int edge_blocked_on_circ:1; - /** Used for OR conns that shouldn't get any new circs attached to them. */ + /** Used for OR conns that shouldn't get any new circs attached to them, + * because the connection is too old. */ + /* XXXX "obsolete" isn't really a good name here. */ unsigned int or_is_obsolete:1; /** For AP connections only. If 1, and we fail to reach the chosen exit, * stop requiring it. */ diff --git a/src/or/test.c b/src/or/test.c index bead357fc..6a0d2e2da 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -4072,7 +4072,7 @@ main(int c, char**v) crypto_seed_rng(1); - if (0) { + if (1) { bench_aes(); return 0; } |