Merge remote-tracking branch 'origin/maint-0.2.2'

Conflicts:
	src/or/routerlist.c
This commit is contained in:
Nick Mathewson 2011-05-15 11:23:02 -04:00
commit 2fd9cfdc23
2 changed files with 7 additions and 18 deletions

7
changes/bug2732-simple Normal file
View File

@ -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.

View File

@ -5843,8 +5843,6 @@ int
hid_serv_acting_as_directory(void)
{
const routerinfo_t *me = router_get_my_routerinfo();
networkstatus_t *c;
const routerstatus_t *rs;
if (!me)
return 0;
if (!get_options()->HidServDirectoryV2) {
@ -5852,22 +5850,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;
}