From 2391c60c5c89b104572323a439e3560a09c1a6e2 Mon Sep 17 00:00:00 2001 From: Neel Chauhan Date: Tue, 19 Jan 2021 14:51:00 -0800 Subject: Add stream ID to ADDRMAP control event --- src/core/or/circuituse.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core/or/circuituse.c') diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c index 0f3fc29361..018654769d 100644 --- a/src/core/or/circuituse.c +++ b/src/core/or/circuituse.c @@ -2733,6 +2733,11 @@ consider_recording_trackhost(const entry_connection_t *conn, const or_options_t *options = get_options(); char *new_address = NULL; char fp[HEX_DIGEST_LEN+1]; + uint64_t stream_id = 0; + + if (conn) { + stream_id = ENTRY_TO_CONN(conn)->global_identifier; + } /* Search the addressmap for this conn's destination. */ /* If they're not in the address map.. */ @@ -2756,7 +2761,7 @@ consider_recording_trackhost(const entry_connection_t *conn, addressmap_register(conn->socks_request->address, new_address, time(NULL) + options->TrackHostExitsExpire, - ADDRMAPSRC_TRACKEXIT, 0, 0); + ADDRMAPSRC_TRACKEXIT, 0, 0, stream_id); } /** Attempt to attach the connection conn to circ, and send a -- cgit v1.2.3-54-g00ecf