mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 14:32:49 +03:00
[Settings] Remove assumption that all settings have DHCP tag values
Allow for settings to be described by something other than a DHCP option
tag if desirable. Currently used only for the MAC address setting.
Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c.
Remove notion of settings from dhcppkt.c.
Rationalise dhcp.c to use settings API only for final registration of the
DHCP options, rather than using {store,fetch}_setting throughout.
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
#include <gpxe/segment.h>
|
||||
#include <gpxe/init.h>
|
||||
#include <gpxe/netdevice.h>
|
||||
#include <gpxe/dhcp.h>
|
||||
#include <gpxe/dhcppkt.h>
|
||||
#include <gpxe/fakedhcp.h>
|
||||
#include <gpxe/image.h>
|
||||
#include <gpxe/features.h>
|
||||
|
||||
@@ -400,8 +399,8 @@ static int nbi_prepare_dhcp ( struct image *image ) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if ( ( rc = create_dhcpack ( boot_netdev, basemem_packet,
|
||||
sizeof ( basemem_packet ) ) ) != 0 ) {
|
||||
if ( ( rc = create_fakedhcpack ( boot_netdev, basemem_packet,
|
||||
sizeof ( basemem_packet ) ) ) != 0 ) {
|
||||
DBGC ( image, "NBI %p failed to build DHCP packet\n", image );
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user