]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: lwip: tftp: bind to TFTP port only when in server mode
authorJerome Forissier <jerome.forissier@linaro.org>
Wed, 16 Oct 2024 10:04:04 +0000 (12:04 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 16 Oct 2024 17:11:56 +0000 (11:11 -0600)
commit5634ecc88e9fc9bd1bd422861ee4d9dbac851b32
treeabaa9ae753ee1e1dfe6dc72e35b10681b1b035f1
parent98ad145db61a51308abb9de3212d4e3078d145c0
net: lwip: tftp: bind to TFTP port only when in server mode

The TFTP app should not bind to the TFTP server port when configured as
a client. Instead, the local port should be chosen from the dynamic
range (49152 ~ 65535) so that if the application is stopped and started
again, the remote server will not consider the new packets as part of
the same context (which would cause an error since a new RRQ would be
unexpected).

Submitted upstream: https://savannah.nongnu.org/patch/?10480

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/lwip/lwip/src/apps/tftp/tftp.c