test(client): add integration tests for packet length and server fill
Verify that the client correctly handles custom packet lengths and server fill negotiation to ensure protocol compliance and support for larger MTUs. Add validation to reject empty server fill strings during configuration.
This commit is contained in:
6 files changed
+384
-2
No files matched your search
@@ -775,6 +775,11 @@ fn validate_protocol_config(config: &ClientConfig) -> Result<(), ClientError> {
|
||||
|
||||
if let Some(fill) = &config.server_fill {
|
||||
let len = fill.len();
|
||||
if len == 0 {
|
||||
return Err(ClientError::InvalidConfig {
|
||||
reason: "server_fill must not be empty".to_owned(),
|
||||
});
|
||||
}
|
||||
if len > MAX_SERVER_FILL_BYTES {
|
||||
return Err(ClientError::InvalidConfig {
|
||||
reason: format!("server_fill must be <= {MAX_SERVER_FILL_BYTES} bytes, got {len}"),
|
||||
|
||||
Reference in new issue
Block a user