Only download microdesc consensus from caches that support it

Bugfix on 0.2.3.1-alpha; found by arma; never got a bug number.
This commit is contained in:
Nick Mathewson 2011-07-14 14:19:18 -04:00
parent d67b304b20
commit 642cff5bca
2 changed files with 6 additions and 1 deletions

3
changes/microdesc_con_dl Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes:
- Only try to download a microdescriptor-flavored consensus from
a directory cache that provides those. Bugfix on 0.2.3.1-alpha.

View File

@ -379,11 +379,13 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
break;
case DIR_PURPOSE_FETCH_STATUS_VOTE:
case DIR_PURPOSE_FETCH_DETACHED_SIGNATURES:
case DIR_PURPOSE_FETCH_CERTIFICATE:
type = V3_DIRINFO;
break;
case DIR_PURPOSE_FETCH_CONSENSUS:
case DIR_PURPOSE_FETCH_CERTIFICATE:
type = V3_DIRINFO;
if (resource && !strcmp(resource,"microdesc"))
type |= MICRODESC_DIRINFO;
break;
case DIR_PURPOSE_FETCH_MICRODESC:
type = MICRODESC_DIRINFO;