mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
identify the exit node correctly when we timeout and detach
from a circuit, even if the exit node is in the middle. there are probably a few more places that need this fix too. svn:r10076
This commit is contained in:
parent
95734e73ff
commit
590c6ff33d
@ -1190,7 +1190,7 @@ consider_recording_trackhost(edge_connection_t *conn, origin_circuit_t *circ)
|
|||||||
/** Attempt to attach the connection <b>conn</b> to <b>circ</b>, and send a
|
/** Attempt to attach the connection <b>conn</b> to <b>circ</b>, and send a
|
||||||
* begin or resolve cell as appropriate. Return values are as for
|
* begin or resolve cell as appropriate. Return values are as for
|
||||||
* connection_ap_handshake_attach_circuit. The stream will exit from the hop
|
* connection_ap_handshake_attach_circuit. The stream will exit from the hop
|
||||||
* indicatd by <b>cpath</b>, or to the last hop in circ's cpath if
|
* indicated by <b>cpath</b>, or from the last hop in circ's cpath if
|
||||||
* <b>cpath</b> is NULL. */
|
* <b>cpath</b> is NULL. */
|
||||||
int
|
int
|
||||||
connection_ap_handshake_attach_chosen_circuit(edge_connection_t *conn,
|
connection_ap_handshake_attach_chosen_circuit(edge_connection_t *conn,
|
||||||
|
@ -346,7 +346,6 @@ connection_ap_expire_beginning(void)
|
|||||||
connection_t **carray;
|
connection_t **carray;
|
||||||
edge_connection_t *conn;
|
edge_connection_t *conn;
|
||||||
circuit_t *circ;
|
circuit_t *circ;
|
||||||
const char *nickname;
|
|
||||||
int n, i;
|
int n, i;
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
or_options_t *options = get_options();
|
or_options_t *options = get_options();
|
||||||
@ -407,13 +406,12 @@ connection_ap_expire_beginning(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
|
tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
|
||||||
nickname = build_state_get_exit_nickname(
|
|
||||||
TO_ORIGIN_CIRCUIT(circ)->build_state);
|
|
||||||
log_fn(cutoff < 15 ? LOG_INFO : severity, LD_APP,
|
log_fn(cutoff < 15 ? LOG_INFO : severity, LD_APP,
|
||||||
"We tried for %d seconds to connect to '%s' using exit '%s'."
|
"We tried for %d seconds to connect to '%s' using exit '%s'."
|
||||||
" Retrying on a new circuit.",
|
" Retrying on a new circuit.",
|
||||||
seconds_idle, safe_str(conn->socks_request->address),
|
seconds_idle, safe_str(conn->socks_request->address),
|
||||||
nickname ? nickname : "*unnamed*");
|
conn->cpath_layer ?
|
||||||
|
conn->cpath_layer->extend_info->nickname : "*unnamed*");
|
||||||
/* send an end down the circuit */
|
/* send an end down the circuit */
|
||||||
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT);
|
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT);
|
||||||
/* un-mark it as ending, since we're going to reuse it */
|
/* un-mark it as ending, since we're going to reuse it */
|
||||||
@ -1180,7 +1178,7 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
|
|||||||
* rendezvous descriptor is already here and fresh enough).
|
* rendezvous descriptor is already here and fresh enough).
|
||||||
*
|
*
|
||||||
* The stream will exit from the hop
|
* The stream will exit from the hop
|
||||||
* indicatd by <b>cpath</b>, or to the last hop in circ's cpath if
|
* indicated by <b>cpath</b>, or from the last hop in circ's cpath if
|
||||||
* <b>cpath</b> is NULL.
|
* <b>cpath</b> is NULL.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user