aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRasmus Villemoes2022-10-14 19:43:42 +0200
committerTom Rini2022-11-28 13:06:39 -0500
commit087648b5df8db0d4786ff86e61e7616ebc181cf4 (patch)
tree9e0635e1420af60923b95b421b9436dd2e018da3 /include
parent4b8c44e39c9eb1717831e3b3f31c33e0932b0767 (diff)
net: tftp: sanitize tftp block size, especially for TX
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@prevas.dk> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions