aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-03 09:29:31 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-18 13:14:10 -0500
commit54406f78b84103ed7fd4610a89dda9d37f0f033e (patch)
treed0cc2e9012cdc47e48f6c097c44b2305898709d9 /src/or/router.c
parent6a5528356f41cd71a8cad2c7b66dcd24d177d07b (diff)
downloadtor-54406f78b84103ed7fd4610a89dda9d37f0f033e.tar.gz
tor-54406f78b84103ed7fd4610a89dda9d37f0f033e.zip
Change dataflow on generating 'dir-cache' flag.
Convention is that router_dump_router_to_string() should look at its input "router", which should be generated by router_build_fresh_descirptor().
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 5e4f855410..5c680ce875 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1899,6 +1899,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
ri->addr = addr;
ri->or_port = router_get_advertised_or_port(options);
ri->dir_port = router_get_advertised_dir_port(options, 0);
+ ri->supports_tunnelled_dir_requests = dir_server_mode(options);
ri->cache_info.published_on = time(NULL);
ri->onion_pkey = crypto_pk_dup_key(get_onion_key()); /* must invoke from
* main thread */
@@ -2675,7 +2676,7 @@ router_dump_router_to_string(routerinfo_t *router,
tor_free(p6);
}
- if (dir_server_mode(options)) {
+ if (router->supports_tunnelled_dir_requests) {
smartlist_add(chunks, tor_strdup("tunnelled-dir-server\n"));
}