Erwin Bolwidt wrote:
2. the SSH_FXP_EXTENDED_REPLY packet structure
The structure of this packet is simple:
byte SSH_FXP_EXTENDED_REPLY
uint32 request-id
... any request-specific data ...
It differs from the other packets that use extension by the lack of an
extension name.
In the implementation of an SFTP server that I am creating, I have so
far been able to parse packets free of any session information, and I
think this is a nice and clean design: the packet layer deals with the
wire protocol, and the session layer with packets parsed into memory
structures.
This is not possible in the case of the SSH_FXP_EXTENDED_REPLY packet.
I assume that this problem has been observed by you, as the only
extension for this packet that is defined in the specification, the
"md5-hash" reply, includes an extension name as part of the
request-specific data.
My comment is, shouldn't the specification mandate the inclusion of an
extension-name in the SSH_FXP_EXTENDED_REPLY packet? For compatibility
with older protocol versions, this could be a requirement from a
certain version of the protocol on.
Actually, the fact that the EXTENDED_REPLY for the "md5-hash" extension
includes the name is a typo-- I'll remove it in the next revision.
The extended reply includes the request-id of the request, which
should allow the client to match up request and response.
I'm not sure why the server would need session information in order
to send the reply w/o the name? Perhaps you could be more specific
about what you mean? (Currently, I'm reading 'session information'
as 'saved state'?)