aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-11-10 15:18:35 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-05 19:39:46 -0500
commitcc26d4fa2131e056dc7728335d877e0322611b12 (patch)
treeafee9872da0d113e742c00d4214b155219a82598 /src/or/control.c
parent13bb4f60f0dc390ac92c8963bbf32ee55187d7b5 (diff)
downloadtor-cc26d4fa2131e056dc7728335d877e0322611b12.tar.gz
tor-cc26d4fa2131e056dc7728335d877e0322611b12.zip
control: Support HS v3 for CIRC and CIRC_MINOR event
"REND_QUERY=" can now output a v3 address. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 0e41aab5e5..24e3ebe7dd 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2678,9 +2678,16 @@ circuit_describe_status_for_controller(origin_circuit_t *circ)
}
}
- if (circ->rend_data != NULL) {
- smartlist_add_asprintf(descparts, "REND_QUERY=%s",
- rend_data_get_address(circ->rend_data));
+ if (circ->rend_data != NULL || circ->hs_ident != NULL) {
+ char addr[HS_SERVICE_ADDR_LEN_BASE32 + 1];
+ const char *onion_address;
+ if (circ->rend_data) {
+ onion_address = rend_data_get_address(circ->rend_data);
+ } else {
+ hs_build_address(&circ->hs_ident->identity_pk, HS_VERSION_THREE, addr);
+ onion_address = addr;
+ }
+ smartlist_add_asprintf(descparts, "REND_QUERY=%s", onion_address);
}
{