mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 18:12:36 +03:00
[pxe] Always retrieve cached DHCPACK and apply to relevant network device
When chainloading, always retrieve the cached DHCPACK packet from the underlying PXE stack, and apply it as the original contents of the "net<X>.dhcp" settings block. This allows cached DHCP settings to be used for any chainloaded iPXE binary (not just undionly.kkpxe). This change eliminates the undocumented "use-cached" setting. Issuing the "dhcp" command will now always result in a fresh DHCP request. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -51,12 +51,8 @@ int dhcp ( struct net_device *netdev ) {
|
||||
/* Perform DHCP */
|
||||
printf ( "DHCP (%s %s)", netdev->name,
|
||||
netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
|
||||
if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 ) {
|
||||
if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
|
||||
rc = monojob_wait ( "" );
|
||||
} else if ( rc > 0 ) {
|
||||
printf ( " using cached\n" );
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user