IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: maximum size of packets from client to server



Thomas Anderson <terra1024%yahoo.com@localhost> writes:

> On this same subject, here's something else I think could use
> clarification. RFC4254#section-5.1 states that the "maximum packet
> size" refers to the "maximum size of an individual data packet".
> This raises the question... what qualifies as a data packet. Does
> SSH_MSG_CHANNEL_REQUEST qualify as a data packet, for example?

I'd say it doesn't qualify. Both window size and channel max packet
size apply to the data flow (CHANNEL_DATA, CHANNEL_EXTENDED_DATA) of a
channel, in one direction.

> Also, it's not clear to me what the maximum packet size is referring
> to.

I agree this is unclear. It makes the most sense to me to apply it to
the data payload only. The following comment explains how I apply the
various limits when reading data from some source, to be transmitted
over an ssh channel as CHANNEL_DATA or CHANNEL_EXTENDED_DATA:

  /* There are three numbers that limit the amount of data we can read:
   *
   *   1 The current send_window_size.
   *   2 The send_max_packet size for the channel.
   *   3 (The maximum size for a complete packet SSH_MAX_PACKET)
   *
   * We don't enforce (3) here, but assume that if the remote end has
   * given us a huge send_max_packet, it will also handle huge ssh
   * packets.
   */

Regards,
/Niels



Home | Main Index | Thread Index | Old Index