diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-28 23:37:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-28 23:37:45 -0400 |
commit | f3e8bc391a681ee5e0db1c0cd3796e901ea49846 (patch) | |
tree | 72feb8f5f034f2e93682c6ad14a05551afa5ed84 | |
parent | 8d1fe502842a01063027a8dc2a4cb1326be8805a (diff) | |
download | tor-f3e8bc391a681ee5e0db1c0cd3796e901ea49846.tar.gz tor-f3e8bc391a681ee5e0db1c0cd3796e901ea49846.zip |
Remove the has_old_dnsworkers flag.
-rw-r--r-- | changes/eventdns_routerinfo_key | 4 | ||||
-rw-r--r-- | doc/spec/dir-spec.txt | 12 | ||||
-rw-r--r-- | src/or/connection_edge.c | 5 | ||||
-rw-r--r-- | src/or/or.h | 10 | ||||
-rw-r--r-- | src/or/routerlist.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.c | 9 |
6 files changed, 10 insertions, 31 deletions
diff --git a/changes/eventdns_routerinfo_key b/changes/eventdns_routerinfo_key new file mode 100644 index 0000000000..46dcb52dbb --- /dev/null +++ b/changes/eventdns_routerinfo_key @@ -0,0 +1,4 @@ + o Minor feature removals + - Removed old code to work around versions of Tor so old that they + used multiple forked processes to handle DNS requests. Such + versions of Tor are no longer in use as servers. diff --git a/doc/spec/dir-spec.txt b/doc/spec/dir-spec.txt index 6e35deb00e..4a7a557b31 100644 --- a/doc/spec/dir-spec.txt +++ b/doc/spec/dir-spec.txt @@ -530,16 +530,8 @@ dns logic. Versions of Tor with this field set to false SHOULD NOT be used for reverse hostname lookups. - [All versions of Tor before 0.1.2.2-alpha should be assumed to have - this option set to 0 if it is not present. All Tor versions at - 0.1.2.2-alpha or later should be assumed to have this option set to - 1 if it is not present. Until 0.1.2.1-alpha-dev, this option was - not generated, even when the new DNS code was in use. Versions of Tor - before 0.1.2.1-alpha-dev did not parse this option, so it should be - marked "opt". The dnsworker logic has been removed, so this option - should not be used by new server code. However, it can still be - used, and should still be recognized by new code until Tor 0.1.2.x - is obsolete.] + [This option is obsolete. All Tor current servers should be presumed + to have the evdns backend.] "caches-extra-info" NL diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 8a48d3d239..9627631ad9 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2937,11 +2937,6 @@ connection_ap_can_use_exit(edge_connection_t *conn, routerinfo_t *exit, * addresses with this port. Since the user didn't ask for * this node, err on the side of caution. */ } else if (SOCKS_COMMAND_IS_RESOLVE(conn->socks_request->command)) { - /* Can't support reverse lookups without eventdns. */ - if (conn->socks_request->command == SOCKS_COMMAND_RESOLVE_PTR && - exit->has_old_dnsworkers) - return 0; - /* Don't send DNS requests to non-exit servers by default. */ if (!conn->chosen_exit_name && policy_is_reject_star(exit->exit_policy)) return 0; diff --git a/src/or/or.h b/src/or/or.h index d2a7714db3..e5ca88fc5b 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1498,12 +1498,10 @@ typedef struct { char *contact_info; /**< Declared contact info for this router. */ unsigned int is_hibernating:1; /**< Whether the router claims to be * hibernating */ - unsigned int has_old_dnsworkers:1; /**< Whether the router is using - * dnsworker code. */ - unsigned int caches_extra_info:1; /**< Whether the router caches and serves - * extrainfo documents. */ - unsigned int allow_single_hop_exits:1; /**< Whether the router allows - * single hop exits. */ + unsigned int caches_extra_info:1; /**< Whether the router says it caches and + * serves extrainfo documents. */ + unsigned int allow_single_hop_exits:1; /**< Whether the router says + * it allows single hop exits. */ /* local info */ unsigned int is_running:1; /**< As far as we know, is this OR currently diff --git a/src/or/routerlist.c b/src/or/routerlist.c index e55973f4c1..ff3606c470 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4946,7 +4946,6 @@ router_differences_are_cosmetic(routerinfo_t *r1, routerinfo_t *r2) (r1->contact_info && r2->contact_info && strcasecmp(r1->contact_info, r2->contact_info)) || r1->is_hibernating != r2->is_hibernating || - r1->has_old_dnsworkers != r2->has_old_dnsworkers || cmp_addr_policies(r1->exit_policy, r2->exit_policy)) return 0; if ((r1->declared_family == NULL) != (r2->declared_family == NULL)) diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 05584dc6ed..f7e645e8fd 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -69,7 +69,6 @@ typedef enum { K_V, K_W, K_M, - K_EVENTDNS, K_EXTRA_INFO, K_EXTRA_INFO_DIGEST, K_CACHES_EXTRA_INFO, @@ -286,7 +285,6 @@ static token_rule_t routerdesc_token_table[] = { T01("family", K_FAMILY, ARGS, NO_OBJ ), T01("caches-extra-info", K_CACHES_EXTRA_INFO, NO_ARGS, NO_OBJ ), - T01("eventdns", K_EVENTDNS, ARGS, NO_OBJ ), T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ), T1( "bandwidth", K_BANDWIDTH, GE(3), NO_OBJ ), @@ -1487,13 +1485,6 @@ router_parse_entry_from_string(const char *s, const char *end, router->contact_info = tor_strdup(tok->args[0]); } - if ((tok = find_opt_by_keyword(tokens, K_EVENTDNS))) { - router->has_old_dnsworkers = tok->n_args && !strcmp(tok->args[0], "0"); - } else if (router->platform) { - if (! tor_version_as_new_as(router->platform, "0.1.2.2-alpha")) - router->has_old_dnsworkers = 1; - } - exit_policy_tokens = find_all_exitpolicy(tokens); if (!smartlist_len(exit_policy_tokens)) { log_warn(LD_DIR, "No exit policy tokens in descriptor."); |