[PATCH] net: tftp: fix tftp server initialization
Ramon Fried
rfried.dev at gmail.com
Fri Apr 1 21:43:06 CEST 2022
On Thu, Mar 31, 2022 at 2:50 PM Arjan Minzinga Zijlstra
<arjan.minzingazijlstra at fox-it.com> wrote:
>
> Some globals where not properly initialized causing timeouts
> as data packets where not immediately acknowledged.
I don't see a scenario where these two variables will not be initialized.
Can you please elaborate ?
>
> 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