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
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");
|
||||
|
||||
let mut socket_secure = router_secure
|
||||
.add_socket(VirtualPort::new(1, 10), Unsecure("6f599f81"))
|
||||
.add_socket(VirtualPort::new(1, 10), Unsecure(
|
||||
"6f599f81"
|
||||
))
|
||||
.await
|
||||
.expect("unable to add socket");
|
||||
|
||||
|
|
@ -322,8 +324,10 @@ async fn start_secure() -> JoinHandle<()> {
|
|||
let mut socket_secure = router_secure
|
||||
.add_socket(
|
||||
VirtualPort::new(1, 10),
|
||||
Secure("6f599f81", &SECURE_SERVER_ACCOUNT),
|
||||
//Unsecure("6f599f81"),
|
||||
Secure(
|
||||
"6f599f81",
|
||||
&SECURE_SERVER_ACCOUNT
|
||||
),
|
||||
)
|
||||
.await
|
||||
.expect("unable to add socket");
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ impl<T: CryptoHandler> InternalSocket<T> {
|
|||
for options in &packet.options {
|
||||
match options {
|
||||
SupportedFunctions(functions) => {
|
||||
response.options.push(SupportedFunctions(*functions & 0x04))
|
||||
response.options.push(SupportedFunctions(*functions & 0xFF))
|
||||
}
|
||||
MaximumSubstreamId(max_substream) => {
|
||||
response.options.push(MaximumSubstreamId(*max_substream))
|
||||
|
|
@ -462,7 +462,7 @@ impl<T: CryptoHandler> InternalSocket<T> {
|
|||
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