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
Mike Perry
Tor
Commits
11a22f2d
Commit
11a22f2d
authored
Nov 04, 2021
by
Mike Perry
Browse files
Protover flag handling for congestion control negotiation
parent
2a26985e
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/core/or/or.h
View file @
11a22f2d
...
...
@@ -732,10 +732,8 @@ typedef struct protover_summary_flags_t {
* negotiate hs circuit setup padding. Requires Padding=2. */
unsigned
int
supports_hs_setup_padding
:
1
;
/** True iff this router supports ntor3 _and_ supports negotiating
* additional circuit parameters via the handshake used in ntor3.
*/
unsigned
int
supports_ntor3_and_param_negotiation
:
1
;
/** True iff this router supports congestion control. */
unsigned
int
supports_congestion_control
:
1
;
}
protover_summary_flags_t
;
typedef
struct
routerinfo_t
routerinfo_t
;
...
...
src/core/or/protover.c
View file @
11a22f2d
...
...
@@ -394,13 +394,11 @@ protover_get_supported_protocols(void)
* are editing this list.
*/
/* TODO-324: Add a new Relay=* and a new FlowCtrl=* version to indicate
* support for Ntorv3 and prop324. Make sure they get into the spec. */
return
"Cons=1-2 "
"Desc=1-2 "
"DirCache=2 "
"FlowCtrl=1 "
"FlowCtrl=1
-2
"
"HSDir=1-2 "
"HSIntro=3-5 "
"HSRend=1-2 "
...
...
src/core/or/protover.h
View file @
11a22f2d
...
...
@@ -51,6 +51,9 @@ struct smartlist_t;
/** The protover that signals support for HS circuit setup padding machines */
#define PROTOVER_HS_SETUP_PADDING 2
/** The protover that signals support for congestion control */
#define PROTOVER_FLOWCTRL_CC 2
/** List of recognized subprotocols. */
/// C_RUST_COUPLED: src/rust/protover/ffi.rs `translate_to_rust`
/// C_RUST_COUPLED: src/rust/protover/protover.rs `Proto`
...
...
src/core/or/versions.c
View file @
11a22f2d
...
...
@@ -482,14 +482,9 @@ memoize_protover_summary(protover_summary_flags_t *out,
protocol_list_supports_protocol
(
protocols
,
PRT_PADDING
,
PROTOVER_HS_SETUP_PADDING
);
/* TODO-324: Set these flags based on real values.
out->supports_ntor3_and_param_negotiation =
protocol_list_supports_protocol(protocols, PRT_RELAY,
XXXX)
&&
out
->
supports_congestion_control
=
protocol_list_supports_protocol
(
protocols
,
PRT_FLOWCTRL
,
XXXX);
*/
PROTOVER_FLOWCTRL_CC
);
protover_summary_flags_t
*
new_cached
=
tor_memdup
(
out
,
sizeof
(
*
out
));
cached
=
strmap_set
(
protover_summary_map
,
protocols
,
new_cached
);
...
...
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