[PATCH] net: tftp: fix tftp server initialization

Arjan Minzinga Zijlstra arjan.minzingazijlstra at fox-it.com
Thu Mar 31 10:03:16 CEST 2022


Some globals where not properly initialized causing timeouts
as data packets where not immediately acknowledged.

Signed-off-by: Arjan Minzinga Zijlstra <arjan.minzingazijlstra at fox-it.com>
---
 net/tftp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/tftp.c b/net/tftp.c
index 62a9648474..9d5fe2f2d9 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -912,6 +912,8 @@ void tftp_start_server(void)
 	tftp_block_size = TFTP_BLOCK_SIZE;
 	tftp_cur_block = 0;
 	tftp_our_port = WELL_KNOWN_PORT;
+	tftp_windowsize = 1;
+	tftp_next_ack = tftp_windowsize;
 
 #ifdef CONFIG_TFTP_TSIZE
 	tftp_tsize = 0;
-- 
2.25.1


More information about the U-Boot mailing list