mirror of
https://github.com/ipxe/ipxe
synced 2026-01-14 01:49:16 +03:00
[pxe] Construct all fake DHCP packets before starting PXE NBP
Commit edf74df ("[pxe] Always reconstruct packet for
PXENV_GET_CACHED_INFO") fixed the problems caused by returning stale
DHCP packets (e.g. from an earlier boot attempt using a different
network device), but broke interoperability with NBPs such as WDS
which may overwrite our cached (fake) DHCP packets and expect the
modified packets to be returned by a subsequent call to
PXENV_GET_CACHED_INFO.
Fix by constructing the fake DHCP packets immediately before
transferring control to a PXE NBP. Calls to PXENV_GET_CACHED_INFO
will now never modify the cached packets.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -78,6 +78,9 @@ static int pxe_exec ( struct image *image ) {
|
||||
/* Activate PXE */
|
||||
pxe_activate ( netdev );
|
||||
|
||||
/* Construct fake DHCP packets */
|
||||
pxe_fake_cached_info();
|
||||
|
||||
/* Set PXE command line */
|
||||
pxe_cmdline = image->cmdline;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user