diff options
| author | Simon Rettberg | 2021-10-05 11:32:08 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2021-10-05 11:32:08 +0200 |
| commit | 207263d53a2c9ab9fe6e394ca0163eee3552984e (patch) | |
| tree | f5ec9df709f2223007a5a6e5d505a929f66d4dc4 /src/interface | |
| parent | Merge branch 'master' into openslx (diff) | |
| parent | [readline] Extend maximum read line length to 1024 characters (diff) | |
| download | ipxe-207263d53a2c9ab9fe6e394ca0163eee3552984e.tar.gz ipxe-207263d53a2c9ab9fe6e394ca0163eee3552984e.tar.xz ipxe-207263d53a2c9ab9fe6e394ca0163eee3552984e.zip | |
Merge branch 'master' into openslx
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/efi/efi_cachedhcp.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/interface/efi/efi_cachedhcp.c b/src/interface/efi/efi_cachedhcp.c index 14b531d09..1d4b98fd6 100644 --- a/src/interface/efi/efi_cachedhcp.c +++ b/src/interface/efi/efi_cachedhcp.c @@ -75,17 +75,40 @@ int efi_cachedhcp_record ( EFI_HANDLE device ) { /* Record DHCPACK, if present */ if ( mode->DhcpAckReceived && - ( ( rc = cachedhcp_record ( virt_to_user ( &mode->DhcpAck ), + ( ( rc = cachedhcp_record ( &cached_dhcpack, + virt_to_user ( &mode->DhcpAck ), sizeof ( mode->DhcpAck ) ) ) != 0 ) ) { DBGC ( device, "EFI %s could not record DHCPACK: %s\n", efi_handle_name ( device ), strerror ( rc ) ); - goto err_record; + goto err_dhcpack; + } + + /* Record ProxyDHCPOFFER, if present */ + if ( mode->ProxyOfferReceived && + ( ( rc = cachedhcp_record ( &cached_proxydhcp, + virt_to_user ( &mode->ProxyOffer ), + sizeof ( mode->ProxyOffer ) ) ) != 0)){ + DBGC ( device, "EFI %s could not record ProxyDHCPOFFER: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); + goto err_proxydhcp; + } + + /* Record PxeBSACK, if present */ + if ( mode->PxeReplyReceived && + ( ( rc = cachedhcp_record ( &cached_pxebs, + virt_to_user ( &mode->PxeReply ), + sizeof ( mode->PxeReply ) ) ) != 0)){ + DBGC ( device, "EFI %s could not record PXEBSACK: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); + goto err_pxebs; } /* Success */ rc = 0; - err_record: + err_pxebs: + err_proxydhcp: + err_dhcpack: err_ipv6: bs->CloseProtocol ( device, &efi_pxe_base_code_protocol_guid, efi_image_handle, NULL ); |
