mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +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:
@@ -397,14 +397,7 @@ struct dhcp_netdev_desc {
|
||||
uint16_t device;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Use cached network settings
|
||||
*
|
||||
* Cached network settings may be available from a prior DHCP request
|
||||
* (if running as a PXE NBP), non-volatile storage on the NIC, or
|
||||
* settings set via the command line or an embedded image. If this
|
||||
* flag is not set, it will be assumed that those sources are
|
||||
* insufficient and that DHCP should still be run when autobooting.
|
||||
*/
|
||||
/** Use cached network settings (obsolete; do not reuse this value) */
|
||||
#define DHCP_EB_USE_CACHED DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb2 )
|
||||
|
||||
/** BIOS drive number
|
||||
@@ -677,12 +670,4 @@ extern int start_dhcp ( struct interface *job, struct net_device *netdev );
|
||||
extern int start_pxebs ( struct interface *job, struct net_device *netdev,
|
||||
unsigned int pxe_type );
|
||||
|
||||
/* In environments that can provide cached DHCP packets, this function
|
||||
* should look for such a packet and call store_cached_dhcpack() with
|
||||
* it if it exists.
|
||||
*/
|
||||
extern void get_cached_dhcpack ( void );
|
||||
|
||||
extern void store_cached_dhcpack ( userptr_t data, size_t len );
|
||||
|
||||
#endif /* _IPXE_DHCP_H */
|
||||
|
||||
Reference in New Issue
Block a user