浏览代码

Merge commit 'ioerror/LetsKillNoConnect'

Nick Mathewson 16 年之前
父节点
当前提交
492416be0c
共有 4 个文件被更改,包括 2 次插入34 次删除
  1. 1 0
      ChangeLog
  2. 0 12
      doc/spec/address-spec.txt
  3. 0 16
      src/or/connection_edge.c
  4. 1 6
      src/or/dnsserv.c

+ 1 - 0
ChangeLog

@@ -49,6 +49,7 @@ Changes in version 0.2.2.1-alpha - 2009-0?-??
     - The EXTENDED_EVENTS and VERBOSE_NAMES controller features are now
     - The EXTENDED_EVENTS and VERBOSE_NAMES controller features are now
       always on; using them is necessary for correct forward-compatible
       always on; using them is necessary for correct forward-compatible
       controllers.
       controllers.
+    - Removal of support for .noconnect style addresses.
 
 
 
 
 Changes in version 0.2.1.20 - 2009-??-??
 Changes in version 0.2.1.20 - 2009-??-??

+ 0 - 12
doc/spec/address-spec.txt

@@ -53,15 +53,3 @@
   When Tor sees an address in this format, it tries to look up and connect to
   When Tor sees an address in this format, it tries to look up and connect to
   the specified hidden service.  See rend-spec.txt for full details.
   the specified hidden service.  See rend-spec.txt for full details.
 
 
-4. .noconnect
-
-  SYNTAX:  [string].noconnect
-
-  When Tor sees an address in this format, it immediately closes the
-  connection without attaching it to any circuit.  This is useful for
-  controllers that want to test whether a given application is indeed using
-  the same instance of Tor that they're controlling.
-
-5. [XXX Is there a ".virtual" address that we expose too, or is that
-just intended to be internal? -RD]
-

+ 0 - 16
src/or/connection_edge.c

@@ -1875,14 +1875,6 @@ connection_ap_handshake_process_socks(edge_connection_t *conn)
     return -1;
     return -1;
   } /* else socks handshake is done, continue processing */
   } /* else socks handshake is done, continue processing */
 
 
-  if (hostname_is_noconnect_address(socks->address))
-  {
-    control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
-    control_event_stream_status(conn, STREAM_EVENT_CLOSED, 0);
-    connection_mark_unattached_ap(conn, END_STREAM_REASON_DONE);
-    return -1;
-  }
-
   if (SOCKS_COMMAND_IS_CONNECT(socks->command))
   if (SOCKS_COMMAND_IS_CONNECT(socks->command))
     control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
     control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
   else
   else
@@ -2944,11 +2936,3 @@ failed:
     return BAD_HOSTNAME;
     return BAD_HOSTNAME;
 }
 }
 
 
-/** Check if the address is of the form "y.noconnect"
- */
-int
-hostname_is_noconnect_address(const char *address)
-{
-  return ! strcasecmpend(address, ".noconnect");
-}
-

+ 1 - 6
src/or/dnsserv.c

@@ -92,12 +92,7 @@ evdns_server_callback(struct evdns_server_request *req, void *_data)
     evdns_server_request_respond(req, DNS_ERR_NONE);
     evdns_server_request_respond(req, DNS_ERR_NONE);
     return;
     return;
   }
   }
-  if (q->type == EVDNS_TYPE_A) {
-    /* Refuse any attempt to resolve a noconnect address, right now. */
-    if (hostname_is_noconnect_address(q->name)) {
-      err = DNS_ERR_REFUSED;
-    }
-  } else {
+  if (q->type != EVDNS_TYPE_A) {
     tor_assert(q->type == EVDNS_TYPE_PTR);
     tor_assert(q->type == EVDNS_TYPE_PTR);
   }
   }