fix: fix sending back incorrect supported functions
This commit is contained in:
parent
e7d0a17500
commit
1d1781c7d7
5 changed files with 30 additions and 11 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
|
@ -1472,7 +1472,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand_chacha 0.9.0",
|
"rand_chacha 0.9.0",
|
||||||
"rand_core 0.9.3",
|
"rand_core 0.9.3",
|
||||||
"zerocopy 0.8.14",
|
"zerocopy 0.8.25",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2681,11 +2681,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy"
|
name = "zerocopy"
|
||||||
version = "0.8.14"
|
version = "0.8.25"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
|
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zerocopy-derive 0.8.14",
|
"zerocopy-derive 0.8.25",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2701,9 +2701,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy-derive"
|
name = "zerocopy-derive"
|
||||||
version = "0.8.14"
|
version = "0.8.25"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
|
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ paste = "1.0.15"
|
||||||
typenum = "1.18.0"
|
typenum = "1.18.0"
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tonic-build = "0.12.3"
|
tonic-build = "0.12.3"
|
||||||
|
|
||||||
|
|
@ -50,3 +53,4 @@ tonic-build = "0.12.3"
|
||||||
default = ["secure", "auth"]
|
default = ["secure", "auth"]
|
||||||
secure = []
|
secure = []
|
||||||
auth = []
|
auth = []
|
||||||
|
|
||||||
|
|
|
||||||
11
src/lib.rs
Normal file
11
src/lib.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
mod endianness;
|
||||||
|
mod prudp;
|
||||||
|
pub mod rmc;
|
||||||
|
//mod protocols;
|
||||||
|
|
||||||
|
mod grpc;
|
||||||
|
mod kerberos;
|
||||||
|
mod nex;
|
||||||
|
mod result;
|
||||||
|
mod versions;
|
||||||
|
mod web;
|
||||||
10
src/main.rs
10
src/main.rs
|
|
@ -278,7 +278,9 @@ async fn start_auth() -> JoinHandle<()> {
|
||||||
.expect("unable to start router");
|
.expect("unable to start router");
|
||||||
|
|
||||||
let mut socket_secure = router_secure
|
let mut socket_secure = router_secure
|
||||||
.add_socket(VirtualPort::new(1, 10), Unsecure("6f599f81"))
|
.add_socket(VirtualPort::new(1, 10), Unsecure(
|
||||||
|
"6f599f81"
|
||||||
|
))
|
||||||
.await
|
.await
|
||||||
.expect("unable to add socket");
|
.expect("unable to add socket");
|
||||||
|
|
||||||
|
|
@ -322,8 +324,10 @@ async fn start_secure() -> JoinHandle<()> {
|
||||||
let mut socket_secure = router_secure
|
let mut socket_secure = router_secure
|
||||||
.add_socket(
|
.add_socket(
|
||||||
VirtualPort::new(1, 10),
|
VirtualPort::new(1, 10),
|
||||||
Secure("6f599f81", &SECURE_SERVER_ACCOUNT),
|
Secure(
|
||||||
//Unsecure("6f599f81"),
|
"6f599f81",
|
||||||
|
&SECURE_SERVER_ACCOUNT
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.expect("unable to add socket");
|
.expect("unable to add socket");
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ impl<T: CryptoHandler> InternalSocket<T> {
|
||||||
for options in &packet.options {
|
for options in &packet.options {
|
||||||
match options {
|
match options {
|
||||||
SupportedFunctions(functions) => {
|
SupportedFunctions(functions) => {
|
||||||
response.options.push(SupportedFunctions(*functions & 0x04))
|
response.options.push(SupportedFunctions(*functions & 0xFF))
|
||||||
}
|
}
|
||||||
MaximumSubstreamId(max_substream) => {
|
MaximumSubstreamId(max_substream) => {
|
||||||
response.options.push(MaximumSubstreamId(*max_substream))
|
response.options.push(MaximumSubstreamId(*max_substream))
|
||||||
|
|
@ -462,7 +462,7 @@ impl<T: CryptoHandler> InternalSocket<T> {
|
||||||
MaximumSubstreamId(max_substream) => {
|
MaximumSubstreamId(max_substream) => {
|
||||||
response.options.push(MaximumSubstreamId(*max_substream))
|
response.options.push(MaximumSubstreamId(*max_substream))
|
||||||
}
|
}
|
||||||
SupportedFunctions(funcs) => response.options.push(SupportedFunctions(*funcs)),
|
SupportedFunctions(funcs) => response.options.push(SupportedFunctions(*funcs & 0xFF)),
|
||||||
_ => { /* ? */ }
|
_ => { /* ? */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue