aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_circuit.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2017-10-26 16:48:02 +1100
committerNick Mathewson <nickm@torproject.org>2017-11-02 10:19:05 -0400
commita4f34c1106c5cd14ce3eda3877d41ff2f76ff0dd (patch)
tree8d55d573c148317341f4554b5aca9f2145ecfbc5 /src/or/hs_circuit.c
parent77ed99b1a79e61146d9e3b9f51aac4fd1c2f5b03 (diff)
downloadtor-a4f34c1106c5cd14ce3eda3877d41ff2f76ff0dd.tar.gz
tor-a4f34c1106c5cd14ce3eda3877d41ff2f76ff0dd.zip
Improve v3 onion service logging for intro and rend points
Diagnostics for #23820.
Diffstat (limited to 'src/or/hs_circuit.c')
-rw-r--r--src/or/hs_circuit.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c
index c8c9b4e566..a23edc36a6 100644
--- a/src/or/hs_circuit.c
+++ b/src/or/hs_circuit.c
@@ -343,6 +343,17 @@ send_establish_intro(const hs_service_t *service,
memwipe(payload, 0, sizeof(payload));
}
+/* Return a string constant describing the anonymity of service. */
+static const char *
+get_service_anonymity_string(const hs_service_t *service)
+{
+ if (service->config.is_single_onion) {
+ return "single onion";
+ } else {
+ return "hidden";
+ }
+}
+
/* For a given service, the ntor onion key and a rendezvous cookie, launch a
* circuit to the rendezvous point specified by the link specifiers. On
* success, a circuit identifier is attached to the circuit with the needed
@@ -370,7 +381,15 @@ launch_rendezvous_point_circuit(const hs_service_t *service,
&data->onion_pk,
service->config.is_single_onion);
if (info == NULL) {
- /* We are done here, we can't extend to the rendezvous point. */
+ /* We are done here, we can't extend to the rendezvous point.
+ * If you're running an IPv6-only v3 single onion service on 0.3.2 or with
+ * 0.3.2 clients, and somehow disable the option check, it will fail here.
+ */
+ log_fn(LOG_PROTOCOL_WARN, LD_REND,
+ "Not enough info to open a circuit to a rendezvous point for "
+ "%s service %s.",
+ get_service_anonymity_string(service),
+ safe_str_client(service->onion_address));
goto end;
}
@@ -392,17 +411,19 @@ launch_rendezvous_point_circuit(const hs_service_t *service,
}
}
if (circ == NULL) {
- log_warn(LD_REND, "Giving up on launching rendezvous circuit to %s "
- "for service %s",
+ log_warn(LD_REND, "Giving up on launching a rendezvous circuit to %s "
+ "for %s service %s",
safe_str_client(extend_info_describe(info)),
+ get_service_anonymity_string(service),
safe_str_client(service->onion_address));
goto end;
}
log_info(LD_REND, "Rendezvous circuit launched to %s with cookie %s "
- "for service %s",
+ "for %s service %s",
safe_str_client(extend_info_describe(info)),
safe_str_client(hex_str((const char *) data->rendezvous_cookie,
REND_COOKIE_LEN)),
+ get_service_anonymity_string(service),
safe_str_client(service->onion_address));
tor_assert(circ->build_state);
/* Rendezvous circuit have a specific timeout for the time spent on trying