summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorArjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com>2022-03-31 08:03:16 +0000
committerRamon Fried <ramon@neureality.ai>2022-04-12 22:41:27 +0300
commit1ffe366881a3fd474737f67f2e9fb5bf40104fd3 (patch)
treebe094c474604179a6807c13e467559dceaf84b15 /net
parentd79f1a85697e3af24a97728f6e4f16635bdc8290 (diff)
net: tftp: fix tftp server initialization
Some globals where not properly initialized causing timeouts as data packets where not immediately acknowledged. Fixes: cc6b87ecaa96 ("net: tftp: Add client support for RFC 7440") Signed-off-by: Arjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/tftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tftp.c b/net/tftp.c
index e1e359732e..bfc4c9bde9 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -906,6 +906,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;