]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Increase download timeout for autoexec.ipxe
authorMichael Brown <mcb30@ipxe.org>
Mon, 17 Feb 2025 13:11:28 +0000 (13:11 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 17 Feb 2025 13:30:27 +0000 (13:30 +0000)
commitb35300fc67cc050ce3f709a88a4437153d85e0ee
tree72f34e0da4d14bf26e5dfda7160912469aa13c67
parent8e6b914c53732b6764c344856787cf67dd44026c
[efi] Increase download timeout for autoexec.ipxe

In almost all cases, the download timeout for autoexec.ipxe is
irrelevant: the operation will either succeed or fail relatively
quickly (e.g. due to a nonexistent file).  The overall download
timeout exists only to ensure that an unattended or headless system
will not wait indefinitely in the case of a degenerate network
response (e.g. an HTTP server that returns an endless trickle of data
using chunked transfer encoding without ever reaching the end of the
file).

The current download timeout is too short if PeerDist content encoding
is enabled, since the overall download will abort before the first
peer discovery attempt has completed, and without allowing sufficient
time for an origin server range request.

The single timeout value is currently used for both the download
timeout and the sync timeout.  The latter timeout exists only to allow
network communication to be gracefully quiesced before removing the
temporary MNP network device, and may safely be shortened without
affecting functionality.

Fix by increasing the download timeout from two seconds to 30 seconds,
and defining a separate one-second timeout for the sync operation.

Reported-by: Michael Niehaus <niehaus@live.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_autoexec.c