mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 18:12:36 +03:00
Centralise construction of the DHCP request and response packets.
This commit is contained in:
@@ -397,16 +397,13 @@ static int nbi_prepare_dhcp ( struct image *image ) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if ( ( rc = create_dhcp_packet ( boot_netdev, DHCPACK, basemem_packet,
|
||||
sizeof ( basemem_packet ),
|
||||
&dhcppkt ) ) != 0 ) {
|
||||
if ( ( rc = create_dhcp_response ( boot_netdev, DHCPACK, NULL,
|
||||
basemem_packet,
|
||||
sizeof ( basemem_packet ),
|
||||
&dhcppkt ) ) != 0 ) {
|
||||
DBGC ( image, "NBI %p failed to build DHCP packet\n", image );
|
||||
return rc;
|
||||
}
|
||||
if ( ( rc = copy_dhcp_packet_options ( &dhcppkt, NULL ) ) != 0 ) {
|
||||
DBGC ( image, "NBI %p failed to copy DHCP options\n", image );
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user