mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-22 22:25:51 +01:00
when reporting events about streams, use the "real" address for
the stream, including the requested .exit address. svn:r3810
This commit is contained in:
parent
e07e0a4732
commit
d6a0e5bcc9
1 changed files with 7 additions and 3 deletions
|
@ -939,15 +939,19 @@ control_event_stream_status(connection_t *conn, stream_status_event_t tp)
|
||||||
{
|
{
|
||||||
char *msg;
|
char *msg;
|
||||||
size_t len;
|
size_t len;
|
||||||
char buf[256];
|
char buf[256], buf2[256];
|
||||||
tor_assert(conn->type == CONN_TYPE_AP);
|
tor_assert(conn->type == CONN_TYPE_AP);
|
||||||
tor_assert(conn->socks_request);
|
tor_assert(conn->socks_request);
|
||||||
|
|
||||||
if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS))
|
if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
tor_snprintf(buf, sizeof(buf), "%s:%d",
|
if (conn->chosen_exit_name)
|
||||||
conn->socks_request->address, conn->socks_request->port),
|
tor_snprintf(buf2, sizeof(buf2), ".%s.exit", conn->chosen_exit_name);
|
||||||
|
tor_snprintf(buf, sizeof(buf), "%s%s:%d",
|
||||||
|
conn->socks_request->address,
|
||||||
|
conn->chosen_exit_name ? buf2 : "",
|
||||||
|
conn->socks_request->port),
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
msg = tor_malloc(5+len+1);
|
msg = tor_malloc(5+len+1);
|
||||||
msg[0] = (uint8_t) tp;
|
msg[0] = (uint8_t) tp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue