Pure-Rust asynchronous SSH library, both client and server

#70 config.maximum_packet_size too big is not taken into account

Opened by spack971 on February 8, 2022
spack971 on February 8, 2022

Hi,

I was looking at the code spawning new SSH servers and at src/server/mod.rs:411 I noticed the following:

if config.maximum_packet_size > 65535 {
    error!(
        "Maximum packet size ({:?}) should not larger than a TCP packet (65535)",
        config.maximum_packet_size
    );
}

The maximum packet size is checked however nothing is done with it and the server is spawn anyway with the bogus value. Maybe an option would be to force config.maximum_packet_size value to 65535 is this situation.