Stop using default authorities with both Alternate Dir and Bridge Authority

Stop using the default authorities in networks which provide both
AlternateDirAuthority and AlternateBridgeAuthority.

This bug occurred due to an ambiguity around the use of NO_DIRINFO.
(Does it mean "any" or "none"?)

Partially fixes bug 13163.
This commit is contained in:
teor 2014-10-01 18:37:19 +10:00
parent 22a0708133
commit c1dd43d823
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,4 @@
o Minor bugfixes:
- Stop using the default authorities in networks which provide both
AlternateDirAuthority and AlternateBridgeAuthority.
Partially fixes bug 13163.

View file

@ -959,7 +959,10 @@ consider_adding_dir_servers(const or_options_t *options,
type |= BRIDGE_DIRINFO;
if (!options->AlternateDirAuthority)
type |= V3_DIRINFO | EXTRAINFO_DIRINFO | MICRODESC_DIRINFO;
add_default_trusted_dir_authorities(type);
/* if type == NO_DIRINFO, we don't want to add any of the
* default authorities, because we've replaced them all */
if (type != NO_DIRINFO)
add_default_trusted_dir_authorities(type);
}
if (!options->FallbackDir)
add_default_fallback_dir_servers();