diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-08-20 23:38:20 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-08-20 23:38:20 +0000 |
commit | f71b1ecd9d6c480f8ee17759619a92d12d2811d7 (patch) | |
tree | 6e9e16de13a84408b1c5e3aa1a91c0b8ea18d703 /sys/arch/arm64/stand/efiboot/efipxe.c | |
parent | ea040f2c1fdfb6481acf944aae6f4f999c40ae7b (diff) |
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@
Diffstat (limited to 'sys/arch/arm64/stand/efiboot/efipxe.c')
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efipxe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efipxe.c b/sys/arch/arm64/stand/efiboot/efipxe.c index 9a9af5886fa..fb01d65aceb 100644 --- a/sys/arch/arm64/stand/efiboot/efipxe.c +++ b/sys/arch/arm64/stand/efiboot/efipxe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efipxe.c,v 1.6 2019/08/13 09:00:20 patrick Exp $ */ +/* $OpenBSD: efipxe.c,v 1.7 2019/08/20 23:38:19 patrick Exp $ */ /* * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> * @@ -96,8 +96,8 @@ efi_pxeprobe(void) if (status != EFI_SUCCESS) continue; - depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH); - if (efi_device_path_ncmp(efi_bootdp, dp0, depth)) + depth = efi_device_path_depth(efi_bootdp, MESSAGING_DEVICE_PATH); + if (depth == -1 || efi_device_path_ncmp(efi_bootdp, dp0, depth)) continue; status = EFI_CALL(BS->HandleProtocol, handles[i], &net_guid, |