mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user