diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-07-23 14:07:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-07-23 14:07:32 +0000 |
commit | 15b2b8bd69ff30a85c2364bcc528090b36aa9286 (patch) | |
tree | cde62b5daf0796a6356c9c5f209a9ed8fd845129 /src | |
parent | cc46b232485b192d988bc6ef9ffbfcb88e630491 (diff) | |
download | tor-15b2b8bd69ff30a85c2364bcc528090b36aa9286.tar tor-15b2b8bd69ff30a85c2364bcc528090b36aa9286.tar.gz |
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.
svn:r16144
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitbuild.c | 2 | ||||
-rw-r--r-- | src/or/circuitlist.c | 8 | ||||
-rw-r--r-- | src/or/config.c | 15 | ||||
-rw-r--r-- | src/or/or.h | 5 | ||||
-rw-r--r-- | src/or/rendservice.c | 31 |
5 files changed, 6 insertions, 55 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 69ace8838..1b08637e6 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1365,7 +1365,7 @@ choose_good_exit_server(uint8_t purpose, routerlist_t *dir, 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); } diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index adb0d7867..e592485fc 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -838,14 +838,6 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info, _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)) { diff --git a/src/or/config.c b/src/or/config.c index a7ec8bf93..1d4e58d21 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -221,8 +221,8 @@ static config_var_t _option_vars[] = { 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 @@ static config_var_t _option_vars[] = { 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 @@ static config_var_description_t options_description[] = { { "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 @@ options_validate(or_options_t *old_options, or_options_t *options, 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)) diff --git a/src/or/or.h b/src/or/or.h index ffcb686cb..6274dd091 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2035,11 +2035,6 @@ typedef struct { /** 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. */ diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 5e739c528..f20ed99f4 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -45,8 +45,6 @@ typedef struct rend_service_t { /* 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_service_free(rend_service_t *service) 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_add_service(rend_service_t *service) 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 @@ rend_add_service(rend_service_t *service) 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 @@ rend_config_services(or_options_t *options, int validate_only) 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 @@ rend_services_introduce(void) 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); |