net: tftp: Fix for DATA ACK for block count out of order
authorSean Edmond <seanedmond@linux.microsoft.com>
Thu, 5 Jan 2023 02:16:26 +0000 (18:16 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 2 Feb 2023 19:44:53 +0000 (14:44 -0500)
commit21a265c0d1ef93ed40e1990f33be0bc427e956f0
treea4830c70ec6d5e61e073a5f48dc643834b1b2241
parentc3d9736d54e7504656577020e3608f01c8fa76d5
net: tftp: Fix for DATA ACK for block count out of order

In rfc7440, if an ACK is not received by the server or if the
last data block in a window is dropped, the server will timeout and
retransmit the window.  In this case, the block count received will be
less than the internal block count.  In this case, the client
should not ACK.  ACK should only be sent if the received block
count is greater than the expected block count.

Signed-off-by: Sean Edmond <seanedmond@linux.microsoft.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
net/tftp.c