summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/stand
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2019-08-20 23:38:20 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2019-08-20 23:38:20 +0000
commitf71b1ecd9d6c480f8ee17759619a92d12d2811d7 (patch)
tree6e9e16de13a84408b1c5e3aa1a91c0b8ea18d703 /sys/arch/armv7/stand
parentea040f2c1fdfb6481acf944aae6f4f999c40ae7b (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/armv7/stand')
-rw-r--r--sys/arch/armv7/stand/efiboot/efipxe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/armv7/stand/efiboot/efipxe.c b/sys/arch/armv7/stand/efiboot/efipxe.c
index 654d3474ab6..073e10fca5d 100644
--- a/sys/arch/armv7/stand/efiboot/efipxe.c
+++ b/sys/arch/armv7/stand/efiboot/efipxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efipxe.c,v 1.3 2019/08/13 09:00:20 patrick Exp $ */
+/* $OpenBSD: efipxe.c,v 1.4 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,