diff options
author | Nick Mathewson <nickm@torproject.org> | 2024-03-07 09:30:37 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2024-03-12 09:43:14 -0400 |
commit | 22d51e8e5444fdbd281ef6ef9f40027e6148da28 (patch) | |
tree | 5ea920c64139324efb8842632c9ef2a31a46d0e6 | |
parent | 51f60c2473d18c815384e45e9f08656992a6e0a9 (diff) | |
download | arti-22d51e8e5444fdbd281ef6ef9f40027e6148da28.tar.gz arti-22d51e8e5444fdbd281ef6ef9f40027e6148da28.zip |
Add comments about "unaccompanied" use of Relay{Usage,Exclusion}
When used outside of RelaySelector, these two types don't enforce
one another's presence, and as such have a bit more risk of
negligent use.
-rw-r--r-- | crates/tor-circmgr/src/hspool.rs | 2 | ||||
-rw-r--r-- | crates/tor-guardmgr/src/filter.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/crates/tor-circmgr/src/hspool.rs b/crates/tor-circmgr/src/hspool.rs index ff0fe7af7..f14ccf3f4 100644 --- a/crates/tor-circmgr/src/hspool.rs +++ b/crates/tor-circmgr/src/hspool.rs @@ -270,6 +270,8 @@ impl<R: Runtime> HsCircPool<R> { let path_cfg = self.circmgr.builder().path_config(); let cfg = path_cfg.relay_selection_config(); match avoid_target { + // TODO #504: This is an unaccompanied RelayExclusion, and is therefore a + // bit suspect. We should consider whether we like this behavior. Some(ct) => RelayExclusion::exclude_channel_target_family(&cfg, ct, netdir), None => RelayExclusion::no_relays_excluded(), } diff --git a/crates/tor-guardmgr/src/filter.rs b/crates/tor-guardmgr/src/filter.rs index 378c9f076..acdec2dc5 100644 --- a/crates/tor-guardmgr/src/filter.rs +++ b/crates/tor-guardmgr/src/filter.rs @@ -81,6 +81,8 @@ impl GuardFilter { use tor_netdir::{RelayWeight, WeightRole}; let mut guard_bw: RelayWeight = 0.into(); let mut permitted_bw: RelayWeight = 0.into(); + // TODO #504: This is an unaccompanied RelayUsage, and is therefore a + // bit suspect. We should consider whether we like this behavior. let usage = RelayUsage::new_guard(); // TODO: There is a case to be made for converting "permitted by this |