diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-07-23 11:32:04 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-07-27 13:50:36 +0100 |
commit | e09e1142a3bd8bdb702efc92994c419a53e9933b (patch) | |
tree | 590fa32d0a9512493575ab56f91f68cd954b7a4c /src/include/ipxe/dhcppkt.h | |
parent | db6310c3e5948a327a1c6f5706f727fd6cd67c70 (diff) | |
download | ipxe-e09e1142a3bd8bdb702efc92994c419a53e9933b.tar.gz |
[efi] Record cached ProxyDHCPOFFER and PXEBSACK, if present
Commit cd3de55 ("[efi] Record cached DHCPACK from loaded image's
device handle, if present") added the ability for a chainloaded UEFI
iPXE to reuse an IPv4 address and DHCP options previously obtained by
a built-in PXE stack, without needing to perform a second DHCP
request.
Extend this to also record the cached ProxyDHCPOFFER and PXEBSACK
obtained from the EFI_PXE_BASE_CODE_PROTOCOL instance installed on the
loaded image's device handle, if present.
This allows a chainloaded UEFI iPXE to reuse a boot filename or other
options that were provided via a ProxyDHCP or PXE boot server
mechanism, rather than by standard DHCP.
Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/dhcppkt.h')
-rw-r--r-- | src/include/ipxe/dhcppkt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/ipxe/dhcppkt.h b/src/include/ipxe/dhcppkt.h index f13dfc93d..86075960a 100644 --- a/src/include/ipxe/dhcppkt.h +++ b/src/include/ipxe/dhcppkt.h @@ -56,7 +56,7 @@ dhcppkt_put ( struct dhcp_packet *dhcppkt ) { * @v dhcppkt DHCP packet * @ret len Used length */ -static inline int dhcppkt_len ( struct dhcp_packet *dhcppkt ) { +static inline size_t dhcppkt_len ( struct dhcp_packet *dhcppkt ) { return ( offsetof ( struct dhcphdr, options ) + dhcppkt->options.used_len ); } |