summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efiprefix.c
diff options
context:
space:
mode:
authorMichael Brown2022-12-22 15:59:29 +0100
committerMichael Brown2022-12-22 15:59:29 +0100
commit60b5532cfc1393a8d34cece1b49f953bd72c303c (patch)
tree385698046b0150b477cd13794b6a6914a3ab830b /src/interface/efi/efiprefix.c
parent[efi] Add efi_path_vlan() utility function (diff)
downloadipxe-60b5532cfc1393a8d34cece1b49f953bd72c303c.tar.gz
ipxe-60b5532cfc1393a8d34cece1b49f953bd72c303c.tar.xz
ipxe-60b5532cfc1393a8d34cece1b49f953bd72c303c.zip
[cachedhcp] Include VLAN tag in filter for applying cached DHCPACK
When chainloading iPXE from a VLAN device, the MAC address within the cached DHCPACK will match the MAC address of the trunk device created by iPXE, and the cached DHCPACK will then end up being erroneously applied to the trunk device. This tends to break outbound IPv4 routing, since both the trunk and VLAN devices will have the same assigned IPv4 address. Fix by recording the VLAN tag along with the cached DHCPACK, and treating the VLAN tag as part of the filter used to match the cached DHCPACK against candidate network devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efiprefix.c')
-rw-r--r--src/interface/efi/efiprefix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/efi/efiprefix.c b/src/interface/efi/efiprefix.c
index 126c813d..7286b3e0 100644
--- a/src/interface/efi/efiprefix.c
+++ b/src/interface/efi/efiprefix.c
@@ -78,12 +78,13 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle,
*/
static void efi_init_application ( void ) {
EFI_HANDLE device = efi_loaded_image->DeviceHandle;
+ EFI_DEVICE_PATH_PROTOCOL *path = efi_loaded_image_path;
/* Identify autoboot device, if any */
efi_set_autoboot_ll_addr ( device );
/* Store cached DHCP packet, if any */
- efi_cachedhcp_record ( device );
+ efi_cachedhcp_record ( device, path );
/* Load autoexec script, if any */
efi_autoexec_load ( device );