diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tftp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/tftp.c b/net/tftp.c index c780c33f37..51e062bddf 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -593,6 +593,14 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip, ntohs(*(__be16 *)pkt), (ushort)(tftp_cur_block + 1)); /* + * Only ACK if the block count received is greater than + * the expected block count, otherwise skip ACK. + * (required to properly handle the server retransmitting + * the window) + */ + if ((ushort)(tftp_cur_block + 1) - (short)(ntohs(*(__be16 *)pkt)) > 0) + break; + /* * If one packet is dropped most likely * all other buffers in the window * that will arrive will cause a sending NACK. |