Callisto82 / tftp.net

Implements the TFTP (Trivial File Transfer) protocol (client/server) in an easy-to-use C#/.NET library.
Microsoft Public License
81 stars 38 forks source link

Use proposed options if server does not support negotiated options #24

Closed adam-frisby closed 4 years ago

adam-frisby commented 4 years ago

If the TFTP server does not support negotiated options during uploads (e.g. server responds with ACK rather than OACK to WRQ), use the proposed options rather than "negotiated".

Callisto82 commented 4 years ago

Hi and thanks for your pull request :)

Can you please elaborate on why your change is correct? It seems to me that your proposed change is violating the following section of RFC 2347 (which describes TFTP option negotiation):

If a server implementation does not support option negotiation, it will likely ignore any options appended to the client's request. An option not acknowledged by the server must be ignored by the client and server as if it were never requested.

Also, you only changed the SendWriteRequest state. Wouldn't a similar change be required in SendReadRequest?