Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
0892210d
Commit
0892210d
authored
3 months ago
by
Mike Perry
Browse files
Options
Downloads
Patches
Plain Diff
Ticket 40872: Output conflux nonce and circ rtt to control port
parent
f1370a86
No related branches found
No related tags found
1 merge request
!851
Ticket40872
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/or/conflux_util.c
+5
-2
5 additions, 2 deletions
src/core/or/conflux_util.c
src/feature/control/control_fmt.c
+21
-0
21 additions, 0 deletions
src/feature/control/control_fmt.c
with
26 additions
and
2 deletions
src/core/or/conflux_util.c
+
5
−
2
View file @
0892210d
...
...
@@ -462,8 +462,11 @@ conflux_get_circ_rtt(const circuit_t *circ)
{
if
(
circ
->
conflux
)
{
conflux_leg_t
*
leg
=
conflux_get_leg
(
circ
->
conflux
,
circ
);
tor_assert
(
leg
);
return
leg
->
circ_rtts_usec
;
if
(
BUG
(
!
leg
))
{
return
0
;
}
else
{
return
leg
->
circ_rtts_usec
;
}
}
else
{
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
src/feature/control/control_fmt.c
+
21
−
0
View file @
0892210d
...
...
@@ -21,6 +21,7 @@
#include
"core/or/entry_connection_st.h"
#include
"core/or/or_connection_st.h"
#include
"core/or/origin_circuit_st.h"
#include
"core/or/conflux_util.h"
#include
"core/or/socks_request_st.h"
#include
"feature/control/control_connection_st.h"
...
...
@@ -160,6 +161,26 @@ circuit_describe_status_for_controller(origin_circuit_t *circ)
smartlist_add_asprintf
(
descparts
,
"HS_POW=v1,%u"
,
circ
->
hs_pow_effort
);
}
/* Add conflux id and RTT info, for accurate circuit display. The RTT is
* provided to indicate the primary (preferred) circuit of a set
* (which will have the lowest current RTT). */
if
(
CIRCUIT_IS_CONFLUX
(
TO_CIRCUIT
(
circ
)))
{
const
uint8_t
*
nonce
=
conflux_get_nonce
(
TO_CIRCUIT
(
circ
));
tor_assert
(
nonce
);
/* The conflux nonce is sensitive data. Only output half of it. */
smartlist_add_asprintf
(
descparts
,
"CONFLUX_ID=%s"
,
hex_str
((
const
char
*
)
nonce
,
DIGEST256_LEN
/
2
));
/* If we have a conflux object, the circ is linked and has an RTT */
if
(
TO_CIRCUIT
(
circ
)
->
conflux
)
{
uint64_t
circ_rtt
=
conflux_get_circ_rtt
(
TO_CIRCUIT
(
circ
));
if
(
circ_rtt
)
{
smartlist_add_asprintf
(
descparts
,
"CONFLUX_RTT=%"
PRIu64
,
circ_rtt
);
}
}
}
rv
=
smartlist_join_strings
(
descparts
,
" "
,
0
,
NULL
);
SMARTLIST_FOREACH
(
descparts
,
char
*
,
cp
,
tor_free
(
cp
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment