aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_ident.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-05-30 16:11:59 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:34 -0400
commit713eb08bc9582b49e8073122fb68c3fac5bae188 (patch)
treefe8544abeb5fc6388798b3f15494023522157824 /src/or/hs_ident.c
parent1b403a83821d86ac358e49ae24bd1284ed0dcfab (diff)
downloadtor-713eb08bc9582b49e8073122fb68c3fac5bae188.tar.gz
tor-713eb08bc9582b49e8073122fb68c3fac5bae188.zip
prop224: Add service rendezvous circuit relaunch
This introduces a callback to relaunch a service rendezvous circuit when a previous one failed to build or expired. It unifies the legacy function rend_service_relaunch_rendezvous() with one for specific to prop224. There is now only one entry point for that which is hs_circ_retry_service_rendezvous_point() supporting both legacy and prop224 circuits. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_ident.c')
-rw-r--r--src/or/hs_ident.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/hs_ident.c b/src/or/hs_ident.c
index c3f789db56..e69350d82e 100644
--- a/src/or/hs_ident.c
+++ b/src/or/hs_ident.c
@@ -34,6 +34,16 @@ hs_ident_circuit_free(hs_ident_circuit_t *ident)
tor_free(ident);
}
+/* For a given circuit identifier src, return a newly allocated copy of it.
+ * This can't fail. */
+hs_ident_circuit_t *
+hs_ident_circuit_dup(const hs_ident_circuit_t *src)
+{
+ hs_ident_circuit_t *ident = tor_malloc_zero(sizeof(*ident));
+ memcpy(ident, src, sizeof(*ident));
+ return ident;
+}
+
/* For a given directory connection identifier src, return a newly allocated
* copy of it. This can't fail. */
hs_ident_dir_conn_t *