diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2024-11-29 15:47:32 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-01 14:40:04 -0600 |
commit | eeee0e2b850d2b76d102fc1acca9e3101b1baf3a (patch) | |
tree | c4b2a7a20856ab60d7725ed14eef44fdf79fcaa3 /net/tftp.c | |
parent | da53e03290600c9c34e6806d4ec5d2db9bc3a1a6 (diff) |
net: tftpput: reset timeout_count when an ACK is received
timeout_count is never reset once a tftpput transfer has started. If for
whatever reason timeouts occur frequently, but the server keeps replying
nonetheless, the transfer may be needlessly aborted.
Reset timer_count on reception of an ACK to avoid this situation.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Diffstat (limited to 'net/tftp.c')
-rw-r--r-- | net/tftp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tftp.c b/net/tftp.c index 8f948204a6f..fd9c9492929 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -478,6 +478,7 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip, case TFTP_ACK: #ifdef CONFIG_CMD_TFTPPUT if (tftp_put_active) { + timeout_count = 0; if (tftp_put_final_block_sent) { tftp_complete(); } else { |