Commit 396431c7 authored by Niels Möller's avatar Niels Möller
Browse files

* src/channel.c (parse_channel_open): Don't subtract

SSH_MAX_PACKET_FUZZ here, it's handled in read_data.c.
* src/server_session.c (make_server_session): Likewise.
* src/client_session.c (make_client_session_channel): Likewise.
* src/channel_forward.c (init_channel_forward): Likewise.

Rev: src/channel.c:1.110
Rev: src/channel_forward.c:1.7
Rev: src/client_session.c:1.18
Rev: src/server_session.c:1.83
parent 6965b26d
......@@ -1016,16 +1016,11 @@ parse_channel_open(struct simple_buffer *buffer,
info->type = lookup_atom(info->type_length, info->type_data);
/* We don't support larger packets than the default,
* SSH_MAX_PACKET. The fuzz factor is because the
* channel's max sizes refer to the data string inside the
* packet, while the SSH_PACKET limit refers to the complete
* packet including some overhead (9 octets for
* SSH_MSG_CHANNEL_DATA and 13 octets for
* SSH_MSG_CHANNEL_EXTENDED_DATA). */
if (info->send_max_packet > (SSH_MAX_PACKET - SSH_CHANNEL_MAX_PACKET_FUZZ))
* SSH_MAX_PACKET. */
if (info->send_max_packet > SSH_MAX_PACKET)
{
werror("do_channel_open: The remote end asked for really large packets.\n");
info->send_max_packet = SSH_MAX_PACKET - SSH_CHANNEL_MAX_PACKET_FUZZ;
info->send_max_packet = SSH_MAX_PACKET;
}
return 1;
......
......@@ -55,7 +55,7 @@ init_channel_forward(struct channel_forward *self,
self->super.rec_window_size = initial_window;
/* FIXME: Make maximum packet size configurable. */
self->super.rec_max_packet = SSH_MAX_PACKET - SSH_CHANNEL_MAX_PACKET_FUZZ;
self->super.rec_max_packet = SSH_MAX_PACKET;
self->socket = socket;
......
......@@ -217,7 +217,7 @@ make_client_session_channel(struct lsh_fd *in,
self->super.rec_window_size = initial_window;
/* FIXME: Make maximum packet size configurable */
self->super.rec_max_packet = SSH_MAX_PACKET - SSH_CHANNEL_MAX_PACKET_FUZZ;
self->super.rec_max_packet = SSH_MAX_PACKET;
self->super.request_types = make_alist(0, -1);
......
......@@ -159,7 +159,7 @@ make_server_session(UINT32 initial_window,
self->super.rec_window_size = 0;
/* FIXME: Make maximum packet size configurable. */
self->super.rec_max_packet = SSH_MAX_PACKET - SSH_CHANNEL_MAX_PACKET_FUZZ;
self->super.rec_max_packet = SSH_MAX_PACKET;
self->super.request_types = request_types;
/* Note: We don't need a close handler; the channels resource list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment