summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-11-08 14:21:32 -0500
committerNick Mathewson <nickm@torproject.org>2011-05-05 20:54:12 -0400
commit4cc348e896f74a4e02ef15a77d22fc636b08afae (patch)
treeb83bf38177b446230ee78363155a804bb4ede10f /src/or/directory.c
parent3df22887a3028318dc34a45984a8a195dfc0c026 (diff)
downloadtor-4cc348e896f74a4e02ef15a77d22fc636b08afae.tar.gz
tor-4cc348e896f74a4e02ef15a77d22fc636b08afae.zip
Code to make clients fetch and use microdescriptors for circuit building
To turn this on, set UseMicrodescriptors to "1" (or "auto" if you want it on-if-you're-a-client). It should go auto-by-default once 0.2.3.1-alpha is released. Because of our node logic, directory caches will never use microdescriptors when they have the right routerinfo available.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index f21dc85c05..184a6b4a90 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -147,9 +147,10 @@ purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose)
return 1;
}
-/** Return a newly allocated string describing <b>auth</b>. */
-char *
-dirinfo_type_to_string(dirinfo_type_t auth)
+/** Return a newly allocated string describing <b>auth</b>. Only describes
+ * authority features. */
+static char *
+authdir_type_to_string(dirinfo_type_t auth)
{
char *result;
smartlist_t *lst = smartlist_create();
@@ -328,7 +329,7 @@ directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose,
NULL, payload, upload_len, 0);
} SMARTLIST_FOREACH_END(ds);
if (!found) {
- char *s = dirinfo_type_to_string(type);
+ char *s = authdir_type_to_string(type);
log_warn(LD_DIR, "Publishing server descriptor to directory authorities "
"of type '%s', but no authorities of that type listed!", s);
tor_free(s);
@@ -379,7 +380,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
type = V3_DIRINFO;
break;
case DIR_PURPOSE_FETCH_MICRODESC:
- type = V3_DIRINFO;
+ type = MICRODESC_DIRINFO;
break;
default:
log_warn(LD_BUG, "Unexpected purpose %d", (int)dir_purpose);