aboutsummaryrefslogtreecommitdiff
path: root/src/rust
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-03-01 13:50:00 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-03-05 12:33:43 -0500
commita999cb43df3dc4e64820347486a2d861636bfc2e (patch)
treecefceee5b049b12f427fc8bcad1c6e071df531ab /src/rust
parent955a622391192ff9cb65dddcb110532616f890ff (diff)
downloadtor-a999cb43df3dc4e64820347486a2d861636bfc2e.tar.gz
tor-a999cb43df3dc4e64820347486a2d861636bfc2e.zip
protover: Add missing Padding to translate_to_rust
This commit also explicitly set the value of the PRT enum so we can match/pin the C enum values to the Rust one in protover/ffi.rs. Fixes #29631 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/rust')
-rw-r--r--src/rust/protover/ffi.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index 6ee63adb10..066b08eddb 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -30,6 +30,7 @@ fn translate_to_rust(c_proto: uint32_t) -> Result<Protocol, ProtoverError> {
7 => Ok(Protocol::Desc),
8 => Ok(Protocol::Microdesc),
9 => Ok(Protocol::Cons),
+ 10 => Ok(Protocol::Padding),
_ => Err(ProtoverError::UnknownProtocol),
}
}