]> git.baikalelectronics.ru Git - uboot.git/commitdiff
net: tftp: fix tftp server initialization
authorArjan Minzinga Zijlstra <arjan.minzingazijlstra@fox-it.com>
Thu, 31 Mar 2022 08:03:16 +0000 (08:03 +0000)
committerRamon Fried <ramon@neureality.ai>
Tue, 12 Apr 2022 19:41:27 +0000 (22:41 +0300)
Some globals where not properly initialized causing timeouts
as data packets where not immediately acknowledged.

Fixes: dcb3d41bc583 ("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>
net/tftp.c

index e1e359732ee5d3810182404444adf74d394d066b..bfc4c9bde9cb965484afe0c8188b2226d4bf1a6c 100644 (file)
@@ -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;