summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 11:17:54 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 11:17:54 -0400
commit228b77f64e3d545e9d4dac2adc845ecd929c4ac5 (patch)
tree0eee25ad39e12c208b419bc1fba709597ad02bd8
parent5f2a1a7b4f20be121cd30def95cf7789924ca70a (diff)
parent1b512fb9146a4354067491d9d7de92f594a83390 (diff)
downloadtor-228b77f64e3d545e9d4dac2adc845ecd929c4ac5.tar.gz
tor-228b77f64e3d545e9d4dac2adc845ecd929c4ac5.zip
Merge branch 'bug2732-simpler' into maint-0.2.2
-rw-r--r--changes/bug2732-simple7
-rw-r--r--src/or/routerlist.c18
2 files changed, 7 insertions, 18 deletions
diff --git a/changes/bug2732-simple b/changes/bug2732-simple
new file mode 100644
index 0000000000..367836152d
--- /dev/null
+++ b/changes/bug2732-simple
@@ -0,0 +1,7 @@
+ o Minor bugfixes
+ - Do not reject hidden service descriptors simply because we don't
+ think we have not been assigned the HSDir flag. Clients and
+ hidden services can have a more up-to-date view of the network
+ consensus, and if they think that the directory authorities
+ list us a HSDir, we might actually be one. Related to bug 2732;
+ bugfix on 0.2.0.10-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 6c649ab526..c26f00387d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5758,8 +5758,6 @@ int
hid_serv_acting_as_directory(void)
{
routerinfo_t *me = router_get_my_routerinfo();
- networkstatus_t *c;
- routerstatus_t *rs;
if (!me)
return 0;
if (!get_options()->HidServDirectoryV2) {
@@ -5767,22 +5765,6 @@ hid_serv_acting_as_directory(void)
"because we have not been configured as such.");
return 0;
}
- if (!(c = networkstatus_get_latest_consensus())) {
- log_info(LD_REND, "There's no consensus, so I can't tell if I'm a hidden "
- "service directory");
- return 0;
- }
- rs = networkstatus_vote_find_entry(c, me->cache_info.identity_digest);
- if (!rs) {
- log_info(LD_REND, "We're not listed in the consensus, so we're not "
- "being a hidden service directory.");
- return 0;
- }
- if (!rs->is_hs_dir) {
- log_info(LD_REND, "We're not listed as a hidden service directory in "
- "the consensus, so we won't be one.");
- return 0;
- }
return 1;
}