aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2018-10-23 21:00:51 +0000
committerGeorge Kadianakis <desnacked@riseup.net>2019-01-02 15:12:23 +0200
commit43701e1ebe169a84fe98480bd0aaa09a9eebede6 (patch)
tree05f9c65801a9b25a10a7ec62681488b0d02d1714 /src/core/or/connection_edge.c
parent4ca1df6b326f32fcc87d7d3fd6294221f6964235 (diff)
downloadtor-43701e1ebe169a84fe98480bd0aaa09a9eebede6.tar.gz
tor-43701e1ebe169a84fe98480bd0aaa09a9eebede6.zip
Circuit padding machine creation events.
These event callbacks allow circuit padding to decide when to attempt to launch and negotiate new padding machines, and when to tear old ones down. Co-authored-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r--src/core/or/connection_edge.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 9f76929e53..88be6040fd 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -67,6 +67,7 @@
#include "core/or/circuitbuild.h"
#include "core/or/circuitlist.h"
#include "core/or/circuituse.h"
+#include "core/or/circuitpadding.h"
#include "core/or/connection_edge.h"
#include "core/or/connection_or.h"
#include "core/or/policies.h"
@@ -3694,6 +3695,10 @@ handle_hs_exit_conn(circuit_t *circ, edge_connection_t *conn)
/* Link the circuit and the connection crypt path. */
conn->cpath_layer = origin_circ->cpath->prev;
+ /* If this is the first stream on this circuit, tell circpad */
+ if (!origin_circ->p_streams)
+ circpad_machine_event_circ_has_streams(origin_circ);
+
/* Add it into the linked list of p_streams on this circuit */
conn->next_stream = origin_circ->p_streams;
origin_circ->p_streams = conn;