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

Hotfix/issue 6 update #7

Closed hiowaguy closed 5 years ago

hiowaguy commented 5 years ago

Correct transfer error on large data files when block number 65535 is exceeded. Per the TFTP spec, the lowest valid TFTP data block number is 1, instead of 0. Fixes issue #6 .

Reran unit tests (all passed) and confirmed the issue is resolved.

Callisto82 commented 5 years ago

This article nicely summaries the discussion around block counter wrap around: https://www.compuphase.com/tftp.htm. Both, wrapping arround to zero and wrapping to one should be supported.

I enhanced the library and you can now configure the behaviour using the ITftpTransfer.BlockCounterWrapping property.