HomeFreeBSD

loader: tftp: Copy the first block into the cache

Description

loader: tftp: Copy the first block into the cache

tftp_open reads the first block so copy it in the cached data.
If we have more than one block (i.e. we called tftp_read before
tftp_preload) simply just reset the transfer.

Reported by: mmel
Reviewed by: mmel, tsoome
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33697

(cherry picked from commit dfc9c1d4937d0e2eab2910665069faba814bca1e)

Details

Provenance
manuAuthored on Dec 30 2021, 8:47 AM
Reviewer
mmel
Differential Revision
D33697: loader: tftp: Copy the first block into the cache
Parents
rG28d2b8b70047: loader: lua: test that /boot exists first
Branches
Unknown
Tags
Unknown