From 54406f78b84103ed7fd4610a89dda9d37f0f033e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 3 Nov 2015 09:29:31 -0500 Subject: 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(). --- src/or/router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/or') 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")); } -- cgit v1.2.3-54-g00ecf