Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
69595751
Commit
69595751
authored
Oct 20, 2020
by
David Goulet
🔆
Browse files
hs: Always note the virtual port in the ident
Signed-off-by:
David Goulet
<
dgoulet@torproject.org
>
parent
50f44afe
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/feature/hs/hs_common.c
View file @
69595751
...
...
@@ -887,12 +887,14 @@ hs_set_conn_addr_port(const smartlist_t *ports, edge_connection_t *conn)
chosen_port
=
smartlist_choose
(
matching_ports
);
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
;
}
/* Remember, v2 doesn't use an hs_ident. */
if
(
conn
->
hs_ident
)
{
/* There is always a connection identifier at this point. Regardless of a
* Unix or TCP port, note the virtual port. */
conn
->
hs_ident
->
orig_virtual_port
=
chosen_port
->
virtual_port
;
}
if
(
!
(
chosen_port
->
is_unix_addr
))
{
/* 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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment