aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2023-04-02 21:06:20 +0000
committerMike Perry <mikeperry-git@torproject.org>2023-04-06 15:57:11 +0000
commit2f865b4bba1bedc96f17b696916d74c392c83e1b (patch)
tree5bcd0c44b192fd20052c194679616390009a147e /src/core/or/connection_edge.c
parent21c861bfa3188444798a35e21f26579dd910a452 (diff)
downloadtor-2f865b4bba1bedc96f17b696916d74c392c83e1b.tar.gz
tor-2f865b4bba1bedc96f17b696916d74c392c83e1b.zip
Prop#329 streams: Handle stream usage with conflux
This adds utility functions to help stream block decisions, as well as cpath layer_hint checks for stream cell acceptance, and syncing stream lists for conflux circuits. These functions are then called throughout the codebase to properly manage conflux streams.
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r--src/core/or/connection_edge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index b0ccedc27f..ee6ab8596c 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -70,6 +70,7 @@
#include "core/or/circuitpadding.h"
#include "core/or/connection_edge.h"
#include "core/or/congestion_control_flow.h"
+#include "core/or/conflux_util.h"
#include "core/or/circuitstats.h"
#include "core/or/connection_or.h"
#include "core/or/extendinfo.h"
@@ -628,6 +629,7 @@ connection_half_edge_add(const edge_connection_t *conn,
if (!circ->half_streams) {
circ->half_streams = smartlist_new();
+ conflux_update_half_streams(circ, circ->half_streams);
}
half_conn->stream_id = conn->stream_id;
@@ -3102,6 +3104,10 @@ get_unique_stream_id_by_circ(origin_circuit_t *circ)
test_stream_id))
goto again;
+ if (TO_CIRCUIT(circ)->conflux) {
+ conflux_sync_circ_fields(TO_CIRCUIT(circ)->conflux, circ);
+ }
+
return test_stream_id;
}