diff options
author | teor <teor@torproject.org> | 2020-04-16 08:13:02 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-29 22:43:09 +1000 |
commit | a0b12f3cd40fc00c9bdbb1ff01b0d074673a7524 (patch) | |
tree | 1046b4bdd6c31108809677d578458d819372b089 /src/feature | |
parent | 063505446f5b85dd11ee8c9b2089f58fd3bf7427 (diff) | |
download | tor-a0b12f3cd40fc00c9bdbb1ff01b0d074673a7524.tar.gz tor-a0b12f3cd40fc00c9bdbb1ff01b0d074673a7524.zip |
relay/circuitbuild: Refactor open connection for extend
Re-use the newly created extend_info to launch the connection in
circuit_open_connection_for_extend().
No behaviour change.
Part of 33817.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/relay/circuitbuild_relay.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c index a926a1d81d..d6ea22ca70 100644 --- a/src/feature/relay/circuitbuild_relay.c +++ b/src/feature/relay/circuitbuild_relay.c @@ -273,10 +273,11 @@ circuit_open_connection_for_extend(const struct extend_cell_t *ec, if (should_launch) { /* we should try to open a connection */ - channel_t *n_chan = channel_connect_for_circuit(&ec->orport_ipv4.addr, - ec->orport_ipv4.port, - (const char*)ec->node_id, - &ec->ed_pubkey); + channel_t *n_chan = channel_connect_for_circuit( + &circ->n_hop->addr, + circ->n_hop->port, + circ->n_hop->identity_digest, + &circ->n_hop->ed_identity); if (!n_chan) { log_info(LD_CIRC,"Launching n_chan failed. Closing circuit."); circuit_mark_for_close(circ, END_CIRC_REASON_CONNECTFAILED); |