diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-02 10:33:33 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-02 10:33:33 -0700 |
commit | 00e150a0e4967f5859f3eecb51fb54104d87335d (patch) | |
tree | 05af7492cfb277c15b241e2111455c8411bdb2b4 /src | |
parent | d7bbfd0f6217181fc7f4a4a71d23874873a5262a (diff) | |
parent | 66e76066e0ae61b6a22eccc238b5ed75d705547f (diff) | |
download | tor-00e150a0e4967f5859f3eecb51fb54104d87335d.tar.gz tor-00e150a0e4967f5859f3eecb51fb54104d87335d.zip |
Merge branch 'bug25939_034_01_squashed'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/hs_service.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 9001a521ab..f1f26954ae 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -3062,6 +3062,12 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports, goto err; } + /* Build the onion address for logging purposes but also the control port + * uses it for the HS_DESC event. */ + hs_build_address(&service->keys.identity_pk, + (uint8_t) service->config.version, + service->onion_address); + /* The only way the registration can fail is if the service public key * already exists. */ if (BUG(register_service(hs_service_map, service) < 0)) { @@ -3071,14 +3077,10 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports, goto err; } - /* Last step is to build the onion address. */ - hs_build_address(&service->keys.identity_pk, - (uint8_t) service->config.version, - service->onion_address); - *address_out = tor_strdup(service->onion_address); - log_info(LD_CONFIG, "Added ephemeral v3 onion service: %s", safe_str_client(service->onion_address)); + + *address_out = tor_strdup(service->onion_address); ret = RSAE_OKAY; goto end; |