aboutsummaryrefslogtreecommitdiff
path: root/src/rust/protover/errors.rs
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-14 11:28:37 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-14 11:28:37 -0400
commitdd63b972883f6c0b23ee2f7661b7897b229dd28f (patch)
tree58d3a6bedb61dc9fcc8f1c1a99f2a170fa96e4f8 /src/rust/protover/errors.rs
parent741edf1b458f56f516a02aa72bfae99371b3ec5a (diff)
downloadtor-dd63b972883f6c0b23ee2f7661b7897b229dd28f.tar.gz
tor-dd63b972883f6c0b23ee2f7661b7897b229dd28f.zip
Implement proposal 318: Limit protovers to 0..63
In brief: we go through a lot of gymnastics to handle huge protover numbers, but after years of development we're not even close to 10 for any of our current versions. We also have a convenient workaround available in case we ever run out of protocols: if (for example) we someday need Link=64, we can just add Link2=0 or something. This patch is a minimal patch to change tor's behavior; it doesn't take advantage of the new restrictions. Implements #40133 and proposal 318.
Diffstat (limited to 'src/rust/protover/errors.rs')
-rw-r--r--src/rust/protover/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rust/protover/errors.rs b/src/rust/protover/errors.rs
index dc0d8735f4..04397ac4fe 100644
--- a/src/rust/protover/errors.rs
+++ b/src/rust/protover/errors.rs
@@ -36,7 +36,7 @@ impl Display for ProtoverError {
ProtoverError::Unparseable => write!(f, "The protover string was unparseable."),
ProtoverError::ExceedsMax => write!(
f,
- "The high in a (low, high) protover range exceeds u32::MAX."
+ "The high in a (low, high) protover range exceeds 63."
),
ProtoverError::ExceedsExpansionLimit => write!(
f,