diff options
author | George Kadianakis <desnacked@riseup.net> | 2018-09-12 15:52:41 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2018-09-15 16:32:24 +0300 |
commit | 6069185bcc61fe797582b9b9826a5d52e4aabb22 (patch) | |
tree | 369b19c41c33df2d9c7bb25f8c69cf0f1d36f459 /src/feature/hs/hs_common.c | |
parent | 5d34a8cbbb8ac4b6edd6800e10b5cb6dba1dcbcb (diff) | |
download | tor-6069185bcc61fe797582b9b9826a5d52e4aabb22.tar.gz tor-6069185bcc61fe797582b9b9826a5d52e4aabb22.zip |
Save original virtual port in edge conn HS ident.
Diffstat (limited to 'src/feature/hs/hs_common.c')
-rw-r--r-- | src/feature/hs/hs_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c index 12405a79cb..c36892e0f8 100644 --- a/src/feature/hs/hs_common.c +++ b/src/feature/hs/hs_common.c @@ -882,6 +882,11 @@ hs_set_conn_addr_port(const smartlist_t *ports, edge_connection_t *conn) smartlist_free(matching_ports); if (chosen_port) { if (!(chosen_port->is_unix_addr)) { + /* save the original destination before we overwrite it */ + if (conn->hs_ident) { + conn->hs_ident->orig_virtual_port = TO_CONN(conn)->port; + } + /* Get a non-AF_UNIX connection ready for connection_exit_connect() */ tor_addr_copy(&TO_CONN(conn)->addr, &chosen_port->real_addr); TO_CONN(conn)->port = chosen_port->real_port; |