summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiBootManagerLib
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2018-01-23 15:06:52 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2018-01-25 13:36:56 +0800
commit6945837e4c30231b82c85d71df69f8aaab88f352 (patch)
treee640fefa79750bb06c988c956dc761cf98f9b2a9 /MdeModulePkg/Library/UefiBootManagerLib
parent4faf5340467a9595b1df7f4faf43f78ec59d3157 (diff)
downloadedk2-6945837e4c30231b82c85d71df69f8aaab88f352.tar.gz
edk2-6945837e4c30231b82c85d71df69f8aaab88f352.tar.bz2
edk2-6945837e4c30231b82c85d71df69f8aaab88f352.zip
MdeModulePkg/UefiBootManagerLib: Skip the DNS device path node check.
After HTTP boot successfully in home mode, the HTTP device path will be updated accordingly. So, the new device path may be appended with a DNS device path node. When executing home mode boot again, the original HTTP device path will mismatch with the new updated one, which will cause the HTTP boot failure. So, we need update the current match algorithm to match the correct FilePath. Since the DNS device path is an optional, we can skip it check. This patch is to fix above issue. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index d6844823aa..64042338ea 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1,7 +1,7 @@
/** @file
Library functions which relates with booting.
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1119,6 +1119,14 @@ BmMatchHttpBootDevicePath (
return FALSE;
}
+ if (DevicePathSubType (Left) == MSG_DNS_DP) {
+ Left = NextDevicePathNode (Left);
+ }
+
+ if (DevicePathSubType (Right) == MSG_DNS_DP) {
+ Right = NextDevicePathNode (Right);
+ }
+
if (((DevicePathSubType (Left) != MSG_IPv4_DP) || (DevicePathSubType (Right) != MSG_IPv4_DP)) &&
((DevicePathSubType (Left) != MSG_IPv6_DP) || (DevicePathSubType (Right) != MSG_IPv6_DP)) &&
((DevicePathSubType (Left) != MSG_URI_DP) || (DevicePathSubType (Right) != MSG_URI_DP))