summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-07-16 15:47:00 -0400
committerNick Mathewson <nickm@torproject.org>2015-07-16 15:47:00 -0400
commit6a08bcf530f5991ae0e2600ef01be377857b5942 (patch)
tree172201b27b625f4e2565cc801a1c4b62a23aa20f
parent2ba6542517fcff4ec4e7051870085cfdb6bc26aa (diff)
parent2f8cf524ba4e565ab613504a4c41fd724d32facc (diff)
downloadtor-6a08bcf530f5991ae0e2600ef01be377857b5942.tar.gz
tor-6a08bcf530f5991ae0e2600ef01be377857b5942.zip
Merge remote-tracking branch 'public/ticket16543'
-rw-r--r--changes/bug165435
-rw-r--r--src/or/config.c4
-rw-r--r--src/or/directory.c6
-rw-r--r--src/or/dirserv.c18
-rw-r--r--src/or/dirvote.h3
-rw-r--r--src/or/networkstatus.c2
-rw-r--r--src/or/or.h3
-rw-r--r--src/or/router.c2
-rw-r--r--src/or/routerlist.c5
9 files changed, 18 insertions, 30 deletions
diff --git a/changes/bug16543 b/changes/bug16543
new file mode 100644
index 0000000000..6f77eaa8ad
--- /dev/null
+++ b/changes/bug16543
@@ -0,0 +1,5 @@
+ - Removed features:
+ - Remove the HidServDirectoryV2 option. Now all relays offer to store
+ hidden service descriptors. Related to 16543.
+ - Remove the VoteOnHidServDirectoriesV2 option, since all authorities
+ have long set it to 1. Closes ticket 16543.
diff --git a/src/or/config.c b/src/or/config.c
index e686f61a26..011a36db17 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -278,7 +278,7 @@ static config_var_t option_vars_[] = {
V(AccelName, STRING, NULL),
V(AccelDir, FILENAME, NULL),
V(HashedControlPassword, LINELIST, NULL),
- V(HidServDirectoryV2, BOOL, "1"),
+ OBSOLETE("HidServDirectoryV2"),
VAR("HiddenServiceDir", LINELIST_S, RendConfigLines, NULL),
VAR("HiddenServiceDirGroupReadable", LINELIST_S, RendConfigLines, NULL),
VAR("HiddenServiceOptions",LINELIST_V, RendConfigLines, NULL),
@@ -448,6 +448,7 @@ static config_var_t option_vars_[] = {
V(V3BandwidthsFile, FILENAME, NULL),
V(GuardfractionFile, FILENAME, NULL),
VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
+ OBSOLETE("VoteOnHidServDirectoriesV2"),
V(VirtualAddrNetworkIPv4, STRING, "127.192.0.0/10"),
V(VirtualAddrNetworkIPv6, STRING, "[FE80::]/10"),
V(WarnPlaintextPorts, CSV, "23,109,110,143"),
@@ -460,7 +461,6 @@ static config_var_t option_vars_[] = {
NULL),
VAR("__OwningControllerProcess",STRING,OwningControllerProcess, NULL),
V(MinUptimeHidServDirectoryV2, INTERVAL, "96 hours"),
- V(VoteOnHidServDirectoriesV2, BOOL, "1"),
V(TestingServerDownloadSchedule, CSV_INTERVAL, "0, 0, 0, 60, 60, 120, "
"300, 900, 2147483647"),
V(TestingClientDownloadSchedule, CSV_INTERVAL, "0, 0, 60, 300, 600, "
diff --git a/src/or/directory.c b/src/or/directory.c
index 8d7f9f4dea..9461606f1b 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -3095,8 +3095,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
goto done;
}
- if (options->HidServDirectoryV2 &&
- connection_dir_is_encrypted(conn) &&
+ if (connection_dir_is_encrypted(conn) &&
!strcmpstart(url,"/tor/rendezvous2/")) {
/* Handle v2 rendezvous descriptor fetch request. */
const char *descp;
@@ -3240,8 +3239,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
log_debug(LD_DIRSERV,"rewritten url as '%s'.", escaped(url));
/* Handle v2 rendezvous service publish request. */
- if (options->HidServDirectoryV2 &&
- connection_dir_is_encrypted(conn) &&
+ if (connection_dir_is_encrypted(conn) &&
!strcmpstart(url,"/tor/rendezvous2/publish")) {
switch (rend_cache_store_v2_desc_as_dir(body)) {
case RCS_NOTDIR:
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 71be626fff..0a15332163 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2128,8 +2128,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
node_t *node,
routerinfo_t *ri,
time_t now,
- int listbadexits,
- int vote_on_hsdirs)
+ int listbadexits)
{
const or_options_t *options = get_options();
uint32_t routerbw_kb = dirserv_get_credible_bandwidth_kb(ri);
@@ -2164,8 +2163,8 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
}
rs->is_bad_exit = listbadexits && node->is_bad_exit;
- node->is_hs_dir = dirserv_thinks_router_is_hs_dir(ri, node, now);
- rs->is_hs_dir = vote_on_hsdirs && node->is_hs_dir;
+ rs->is_hs_dir = node->is_hs_dir =
+ dirserv_thinks_router_is_hs_dir(ri, node, now);
rs->is_named = rs->is_unnamed = 0;
@@ -2203,8 +2202,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
if (routerset_contains_routerstatus(options->TestingDirAuthVoteHSDir,
rs, 0)) {
- /* TestingDirAuthVoteHSDir respects VoteOnHidServDirectoriesV2 */
- rs->is_hs_dir = vote_on_hsdirs;
+ rs->is_hs_dir = 1;
}
}
}
@@ -2730,7 +2728,6 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
char identity_digest[DIGEST_LEN];
char signing_key_digest[DIGEST_LEN];
int listbadexits = options->AuthDirListBadExits;
- int vote_on_hsdirs = options->VoteOnHidServDirectoriesV2;
routerlist_t *rl = router_get_routerlist();
time_t now = time(NULL);
time_t cutoff = now - ROUTER_MAX_AGE_TO_PUBLISH;
@@ -2821,8 +2818,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
vrs = tor_malloc_zero(sizeof(vote_routerstatus_t));
rs = &vrs->status;
set_routerstatus_from_routerinfo(rs, node, ri, now,
- listbadexits,
- vote_on_hsdirs);
+ listbadexits);
if (ri->signing_key_cert) {
memcpy(vrs->ed25519_id, ri->signing_key_cert->signing_key.pubkey,
@@ -2919,14 +2915,12 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
v3_out->known_flags = smartlist_new();
smartlist_split_string(v3_out->known_flags,
- "Authority Exit Fast Guard Stable V2Dir Valid",
+ "Authority Exit Fast Guard Stable V2Dir Valid HSDir",
0, SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
if (vote_on_reachability)
smartlist_add(v3_out->known_flags, tor_strdup("Running"));
if (listbadexits)
smartlist_add(v3_out->known_flags, tor_strdup("BadExit"));
- if (vote_on_hsdirs)
- smartlist_add(v3_out->known_flags, tor_strdup("HSDir"));
smartlist_sort_strings(v3_out->known_flags);
if (options->ConsensusParams) {
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index 0fb2b2599b..dca8540870 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -145,8 +145,7 @@ const cached_dir_t *dirvote_get_vote(const char *fp, int flags);
void set_routerstatus_from_routerinfo(routerstatus_t *rs,
node_t *node,
routerinfo_t *ri, time_t now,
- int listbadexits,
- int vote_on_hsdirs);
+ int listbadexits);
networkstatus_t *
dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
authority_cert_t *cert);
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 9de1f88aaf..71a2c0f121 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1678,7 +1678,7 @@ networkstatus_getinfo_by_purpose(const char *purpose_string, time_t now)
if (bridge_auth && ri->purpose == ROUTER_PURPOSE_BRIDGE)
dirserv_set_router_is_running(ri, now);
/* then generate and write out status lines for each of them */
- set_routerstatus_from_routerinfo(&rs, node, ri, now, 0, 0);
+ set_routerstatus_from_routerinfo(&rs, node, ri, now, 0);
smartlist_add(statuses, networkstatus_getinfo_helper_single(&rs));
} SMARTLIST_FOREACH_END(ri);
diff --git a/src/or/or.h b/src/or/or.h
index 4b3762f00b..cbbfe9ddcd 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3593,10 +3593,7 @@ typedef struct {
int PublishHidServDescriptors;
int FetchServerDescriptors; /**< Do we fetch server descriptors as normal? */
int FetchHidServDescriptors; /**< and hidden service descriptors? */
- int HidServDirectoryV2; /**< Do we participate in the HS DHT? */
- int VoteOnHidServDirectoriesV2; /**< As a directory authority, vote on
- * assignment of the HSDir flag? */
int MinUptimeHidServDirectoryV2; /**< As directory authority, accept hidden
* service directories after what time? */
diff --git a/src/or/router.c b/src/or/router.c
index 0903eb2082..47825e2d1c 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2583,7 +2583,7 @@ router_dump_router_to_string(routerinfo_t *router,
ntor_cc_line ? ntor_cc_line : "",
family_line,
we_are_hibernating() ? "hibernating 1\n" : "",
- options->HidServDirectoryV2 ? "hidden-service-dir\n" : "",
+ "hidden-service-dir\n",
options->AllowSingleHopExits ? "allow-single-hop-exits\n" : "");
if (options->ContactInfo && strlen(options->ContactInfo)) {
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 35021964a2..dc48862201 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5179,11 +5179,6 @@ hid_serv_acting_as_directory(void)
const routerinfo_t *me = router_get_my_routerinfo();
if (!me)
return 0;
- if (!get_options()->HidServDirectoryV2) {
- log_info(LD_REND, "We are not acting as hidden service directory, "
- "because we have not been configured as such.");
- return 0;
- }
return 1;
}