[PATCH 6/6] net: tftp: sanitize tftp block size, especially for TX
Tom Rini
trini at konsulko.com
Mon Nov 28 20:51:55 CET 2022
On Fri, Oct 14, 2022 at 07:43:42PM +0200, Rasmus Villemoes wrote:
> U-Boot does not support IP fragmentation on TX (and unless
> CONFIG_IP_DEFRAG is set, neither on RX). So the blocks we send must
> fit in a single ethernet packet.
>
> Currently, if tftpblocksize is set to something like 5000 and I
> tftpput a large enough file, U-Boot crashes because we overflow
> net_tx_packet (which only has room for 1500 bytes plus change).
>
> Similarly, if tftpblocksize is set to something larger than what we
> can actually receive (e.g. 50000, with NET_MAXDEFRAG being 16384), any
> tftp get just hangs because we never receive any packets.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221128/89e8ce9c/attachment.sig>
More information about the U-Boot
mailing list