[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16144: Patch from Christian Wilms: remove (HiddenService|Rend)(Excl (in tor/trunk: . doc src/or)



Author: nickm
Date: 2008-07-23 10:07:32 -0400 (Wed, 23 Jul 2008)
New Revision: 16144

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/tor.1.in
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/circuitlist.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/rendservice.c
Log:
 r17309@aud-055:  nickm | 2008-07-23 16:05:43 +0200
 Patch from Christian Wilms: remove (HiddenService|Rend)(Exclude)?Nodes options.  They never worked properly, and nobody seems to be using them.  Resolves bug 754.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17309] on 49666b30-7950-49c5-bedf-9dc8f3168102

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/ChangeLog	2008-07-23 14:07:32 UTC (rev 16144)
@@ -38,6 +38,10 @@
       that was not included in the last published rendezvous descriptor,
       don't reschedule publication of the next descriptor. Fixes bug 763.
       Bugfix on 0.0.9.3.
+    - Mark RendNodes, RendExcludeNodes, HiddenServiceNodes, and
+      HiddenServiceExcludeNodes as obsolete: they never worked properly,
+      and nobody claims to be using them. Fixes bug 754. Bugfix on
+      0.1.0.1-rc.  Patch from Christian Wilms.
 
   o Minor bugfixes (controller):
     - When closing an application-side connection because its circuit

Modified: tor/trunk/doc/tor.1.in
===================================================================
--- tor/trunk/doc/tor.1.in	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/doc/tor.1.in	2008-07-23 14:07:32 UTC (rev 16144)
@@ -550,16 +550,6 @@
 .\" .TP
 .LP
 .TP
-\fBRendNodes \fR\fInode\fR,\fInode\fR,\fI...\fP
-A list of identity fingerprints or nicknames of preferred nodes to use for the
-rendezvous point, if possible.
-.LP
-.TP
-\fBRendExcludeNodes \fR\fInode\fR,\fInode\fR,\fI...\fP
-A list of identity fingerprints or nicknames of nodes to never use when
-choosing a rendezvous point.
-.LP
-.TP
 \fBSocksPort \fR\fIPORT\fP
 Advertise this port to listen for connections from Socks-speaking
 applications.  Set this to 0 if you don't want to allow application
@@ -1272,19 +1262,6 @@
 one of the TARGETs from those lines will be chosen at random.
 .LP
 .TP
-\fBHiddenServiceNodes \fR\fInode\fR,\fInode\fR,\fI...\fP
-If possible, use the specified nodes, defined by their identity fingerprints or
-nicknames, as introduction points for the hidden service. If this is left
-unset, Tor will be smart and pick some reasonable ones; most people can leave
-this unset.
-.LP
-.TP
-\fBHiddenServiceExcludeNodes \fR\fInode\fR,\fInode\fR,\fI...\fP
-Do not use the specified nodes, defined by their identity fingerprints or
-nicknames, as introduction points for the hidden service. In normal use there
-is no reason to set this.
-.LP
-.TP
 \fBPublishHidServDescriptors \fR\fB0\fR|\fB1\fR\fP
 If set to 0, Tor will run any hidden services you configure, but it won't
 advertise them to the rendezvous directory. This option is only useful

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/src/or/circuitbuild.c	2008-07-23 14:07:32 UTC (rev 16144)
@@ -1365,7 +1365,7 @@
         return choose_good_exit_server_general(dir,need_uptime,need_capacity);
     case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
       return router_choose_random_node(
-               options->RendNodes, options->RendExcludeNodes, NULL,
+               NULL, NULL, NULL,
                options->ExcludeNodes, need_uptime, need_capacity, 0,
                options->_AllowInvalid & ALLOW_INVALID_RENDEZVOUS, 0, 0);
   }

Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/src/or/circuitlist.c	2008-07-23 14:07:32 UTC (rev 16144)
@@ -838,14 +838,6 @@
         _circ->purpose == CIRCUIT_PURPOSE_C_GENERAL &&
         !_circ->timestamp_dirty) {
       origin_circuit_t *circ = TO_ORIGIN_CIRCUIT(_circ);
-#if 0 /* XXX here while roger investigates a reported RendNodes bug */
-      if (_circ->purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND &&
-          options->RendNodes) {
-        routerinfo_t *exit = build_state_get_exit_router(circ->build_state);
-        if (exit && !router_nickname_is_in_list(exit, options->RendNodes))
-          continue; /* not one of our allowed RendNodes */
-      }
-#endif
       if ((!need_uptime || circ->build_state->need_uptime) &&
           (!need_capacity || circ->build_state->need_capacity) &&
           (internal == circ->build_state->is_internal)) {

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/src/or/config.c	2008-07-23 14:07:32 UTC (rev 16144)
@@ -221,8 +221,8 @@
   V(HashedControlPassword,       LINELIST, NULL),
   V(HidServDirectoryV2,          BOOL,     "0"),
   VAR("HiddenServiceDir",    LINELIST_S, RendConfigLines,    NULL),
-  VAR("HiddenServiceExcludeNodes", LINELIST_S, RendConfigLines, NULL),
-  VAR("HiddenServiceNodes",  LINELIST_S, RendConfigLines,    NULL),
+  OBSOLETE("HiddenServiceExcludeNodes"),
+  OBSOLETE("HiddenServiceNodes"),
   VAR("HiddenServiceOptions",LINELIST_V, RendConfigLines,    NULL),
   VAR("HiddenServicePort",   LINELIST_S, RendConfigLines,    NULL),
   VAR("HiddenServiceVersion",LINELIST_S, RendConfigLines,    NULL),
@@ -275,8 +275,8 @@
   V(RejectPlaintextPorts,        CSV,      ""),
   V(RelayBandwidthBurst,         MEMUNIT,  "0"),
   V(RelayBandwidthRate,          MEMUNIT,  "0"),
-  V(RendExcludeNodes,            STRING,   NULL),
-  V(RendNodes,                   STRING,   NULL),
+  OBSOLETE("RendExcludeNodes"),
+  OBSOLETE("RendNodes"),
   V(RendPostPeriod,              INTERVAL, "1 hour"),
   V(RephistTrackTime,            INTERVAL, "24 hours"),
   OBSOLETE("RouterFile"),
@@ -496,9 +496,6 @@
   { "ReachableAddresses", "Addresses we can connect to, as IP/bits:port-port. "
     "By default, we assume all addresses are reachable." },
   /* reachablediraddresses, reachableoraddresses. */
-  { "RendNodes", "A list of preferred nodes to use for a rendezvous point, "
-    "when possible." },
-  { "RendExcludenodes", "A list of nodes never to use as rendezvous points." },
   /* SafeSOCKS */
   { "SOCKSPort", "The port where we listen for SOCKS connections from "
     "applications." },
@@ -3314,10 +3311,6 @@
     return -1;
   if (check_nickname_list(options->EntryNodes, "EntryNodes", msg))
     return -1;
-  if (check_nickname_list(options->RendNodes, "RendNodes", msg))
-    return -1;
-  if (check_nickname_list(options->RendNodes, "RendExcludeNodes", msg))
-    return -1;
   if (check_nickname_list(options->TestVia, "TestVia", msg))
     return -1;
   if (check_nickname_list(options->MyFamily, "MyFamily", msg))

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/src/or/or.h	2008-07-23 14:07:32 UTC (rev 16144)
@@ -2035,11 +2035,6 @@
   /** Union of ExcludeNodes and ExcludeExitNodes */
   struct routerset_t *_ExcludeExitNodesUnion;
 
-  char *RendNodes; /**< Comma-separated list of nicknames used as introduction
-                    * points. */
-  char *RendExcludeNodes; /**< Comma-separated list of nicknames not to use
-                           * as introduction points. */
-
   /** List of "entry", "middle", "exit", "introduction", "rendezvous". */
   smartlist_t *AllowInvalidNodes;
   int _AllowInvalid; /**< Bitmask; derived from AllowInvalidNodes. */

Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c	2008-07-23 14:07:26 UTC (rev 16143)
+++ tor/trunk/src/or/rendservice.c	2008-07-23 14:07:32 UTC (rev 16144)
@@ -45,8 +45,6 @@
   /* Fields specified in config file */
   char *directory; /**< where in the filesystem it stores it */
   smartlist_t *ports; /**< List of rend_service_port_config_t */
-  char *intro_prefer_nodes; /**< comma-separated list of nicknames */
-  char *intro_exclude_nodes; /**< comma-separated list of nicknames */
   int descriptor_version; /**< Rendezvous descriptor version that will be
                            * published. */
   /* Other fields */
@@ -97,8 +95,6 @@
       rend_intro_point_free(intro););
     smartlist_free(service->intro_nodes);
   }
-  tor_free(service->intro_prefer_nodes);
-  tor_free(service->intro_exclude_nodes);
   if (service->desc)
     rend_service_descriptor_free(service->desc);
   tor_free(service);
@@ -127,10 +123,6 @@
   rend_service_port_config_t *p;
   struct in_addr addr;
 
-  if (!service->intro_prefer_nodes)
-    service->intro_prefer_nodes = tor_strdup("");
-  if (!service->intro_exclude_nodes)
-    service->intro_exclude_nodes = tor_strdup("");
   service->intro_nodes = smartlist_create();
 
   /* If the service is configured to publish unversioned (v0) and versioned
@@ -145,8 +137,6 @@
       memcpy(copy, p, sizeof(rend_service_port_config_t));
       smartlist_add(v0_service->ports, copy);
     });
-    v0_service->intro_prefer_nodes = tor_strdup(service->intro_prefer_nodes);
-    v0_service->intro_exclude_nodes = tor_strdup(service->intro_exclude_nodes);
     v0_service->intro_period_started = service->intro_period_started;
     v0_service->descriptor_version = 0; /* Unversioned descriptor. */
     rend_add_service(v0_service);
@@ -285,24 +275,6 @@
         return -1;
       }
       smartlist_add(service->ports, portcfg);
-    } else if (!strcasecmp(line->key, "HiddenServiceNodes")) {
-      if (service->intro_prefer_nodes) {
-        log_warn(LD_CONFIG,
-                 "Got multiple HiddenServiceNodes lines for a single "
-                 "service.");
-        rend_service_free(service);
-        return -1;
-      }
-      service->intro_prefer_nodes = tor_strdup(line->value);
-    } else if (!strcasecmp(line->key, "HiddenServiceExcludeNodes")) {
-      if (service->intro_exclude_nodes) {
-        log_warn(LD_CONFIG,
-                 "Got multiple HiddenServiceExcludedNodes lines for "
-                 "a single service.");
-        rend_service_free(service);
-        return -1;
-      }
-      service->intro_exclude_nodes = tor_strdup(line->value);
     } else {
       smartlist_t *versions;
       char *version_str;
@@ -1303,8 +1275,7 @@
     smartlist_add_all(exclude_routers, intro_routers);
     /* The directory is now here. Pick three ORs as intro points. */
     for (j=prev_intro_nodes; j < NUM_INTRO_POINTS; ++j) {
-      router = router_choose_random_node(service->intro_prefer_nodes,
-               service->intro_exclude_nodes, exclude_routers,
+      router = router_choose_random_node(NULL, NULL, exclude_routers,
                options->ExcludeNodes, 1, 0, 0,
                get_options()->_AllowInvalid & ALLOW_INVALID_INTRODUCTION,
                0, 0);