[tor-commits] [tor/master] protover: Sort tor's supported protocol versions
nickm at torproject.org
nickm at torproject.org
Fri Feb 14 13:20:51 UTC 2020
commit 4fed49e0dd4754dcc03688af2a30c42de64168bf
Author: teor <teor at torproject.org>
Date: Wed Feb 12 22:15:17 2020 +1000
protover: Sort tor's supported protocol versions
As recommended by the tor directory specification.
Fixes bug 33285; bugfix on 0.4.0.1-alpha.
---
changes/bug33285 | 3 +++
src/core/or/protover.c | 4 ++--
src/rust/protover/protover.rs | 8 ++++----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/changes/bug33285 b/changes/bug33285
new file mode 100644
index 000000000..a4d06a7eb
--- /dev/null
+++ b/changes/bug33285
@@ -0,0 +1,3 @@
+ o Minor bugfixes (protocol versions):
+ - Sort tor's supported protocol version lists, as recommended by the
+ tor directory specification. Fixes bug 33285; bugfix on 0.4.0.1-alpha.
diff --git a/src/core/or/protover.c b/src/core/or/protover.c
index 2a0a06f95..621111622 100644
--- a/src/core/or/protover.c
+++ b/src/core/or/protover.c
@@ -391,6 +391,7 @@ protover_get_supported_protocols(void)
"Cons=1-2 "
"Desc=1-2 "
"DirCache=1-2 "
+ "FlowCtrl=1 "
"HSDir=1-2 "
"HSIntro=3-5 "
"HSRend=1-2 "
@@ -401,9 +402,8 @@ protover_get_supported_protocols(void)
"LinkAuth=3 "
#endif
"Microdesc=1-2 "
- "Relay=1-2 "
"Padding=2 "
- "FlowCtrl=1";
+ "Relay=1-2";
}
/** The protocols from protover_get_supported_protocols(), as parsed into a
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs
index 0ca960bd6..6d2ef33ee 100644
--- a/src/rust/protover/protover.rs
+++ b/src/rust/protover/protover.rs
@@ -161,30 +161,30 @@ pub(crate) fn get_supported_protocols_cstr() -> &'static CStr {
"Cons=1-2 \
Desc=1-2 \
DirCache=1-2 \
+ FlowCtrl=1 \
HSDir=1-2 \
HSIntro=3-4 \
HSRend=1-2 \
Link=1-5 \
LinkAuth=3 \
Microdesc=1-2 \
- Relay=1-2 \
Padding=2 \
- FlowCtrl=1"
+ Relay=1-2"
)
} else {
cstr!(
"Cons=1-2 \
Desc=1-2 \
DirCache=1-2 \
+ FlowCtrl=1 \
HSDir=1-2 \
HSIntro=3-4 \
HSRend=1-2 \
Link=1-5 \
LinkAuth=1,3 \
Microdesc=1-2 \
- Relay=1-2 \
Padding=2 \
- FlowCtrl=1"
+ Relay=1-2"
)
}
}
More information about the tor-commits
mailing list