Browse Source

Remove the has_old_dnsworkers flag.

Nick Mathewson 13 years ago
parent
commit
f3e8bc391a
6 changed files with 10 additions and 31 deletions
  1. 4 0
      changes/eventdns_routerinfo_key
  2. 2 10
      doc/spec/dir-spec.txt
  3. 0 5
      src/or/connection_edge.c
  4. 4 6
      src/or/or.h
  5. 0 1
      src/or/routerlist.c
  6. 0 9
      src/or/routerparse.c

+ 4 - 0
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.

+ 2 - 10
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
 

+ 0 - 5
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;

+ 4 - 6
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

+ 0 - 1
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))

+ 0 - 9
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.");