MI and x86 efiboot: Fix device path type for PXE boot device.
It should be Messaging, not Media Device Path. Taken from OpenBSD, for which this code was originally written: https://cvsweb.openbsd.org/src/sys/arch/amd64/stand/efiboot/efipxe.c#rev1.6 > Network-based device paths use Messaging and not Media types. Thus > in reality the depth was always -1 which made the compare function > a No-Op. Properly check the device path depth value and look for > the Messaging type instead to find the correct NIC. This check > never worked before and was uncovered by the last change. > > Regression noticed by bluhm@
This commit is contained in:
parent
04016d3a36
commit
2f98cf5924
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: efipxe.c,v 1.1 2018/04/11 10:32:09 nonaka Exp $ */
|
||||
/* $NetBSD: efipxe.c,v 1.2 2023/07/24 08:30:42 rin Exp $ */
|
||||
/* $OpenBSD: efipxe.c,v 1.3 2018/01/30 20:19:06 naddy Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -64,7 +64,8 @@ efi_pxe_probe(void)
|
|||
if (EFI_ERROR(status))
|
||||
continue;
|
||||
|
||||
depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH);
|
||||
depth = efi_device_path_depth(efi_bootdp,
|
||||
MESSAGING_DEVICE_PATH);
|
||||
if (efi_device_path_ncmp(efi_bootdp, dp, depth))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: efipxe.c,v 1.2 2018/11/15 23:52:33 jmcneill Exp $ */
|
||||
/* $NetBSD: efipxe.c,v 1.3 2023/07/24 08:30:42 rin Exp $ */
|
||||
/* $OpenBSD: efipxe.c,v 1.3 2018/01/30 20:19:06 naddy Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -64,7 +64,8 @@ efi_pxe_probe(void)
|
|||
if (EFI_ERROR(status))
|
||||
continue;
|
||||
|
||||
depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH);
|
||||
depth = efi_device_path_depth(efi_bootdp,
|
||||
MESSAGING_DEVICE_PATH);
|
||||
if (efi_device_path_ncmp(efi_bootdp, dp, depth))
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue