]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UefiBootManagerLib: Skip the DNS device path node check.
authorJiaxin Wu <jiaxin.wu@intel.com>
Tue, 23 Jan 2018 07:06:52 +0000 (15:06 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 25 Jan 2018 05:36:56 +0000 (13:36 +0800)
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>
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c

index d6844823aa5519c72a182d033000ebd07fe744d4..64042338eab0b575f610075e581c18f620fdc651 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Library functions which relates with booting.\r
 \r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -1119,6 +1119,14 @@ BmMatchHttpBootDevicePath (
         return FALSE;\r
       }\r
 \r
+      if (DevicePathSubType (Left) == MSG_DNS_DP) {\r
+        Left = NextDevicePathNode (Left);\r
+      }\r
+\r
+      if (DevicePathSubType (Right) == MSG_DNS_DP) {\r
+        Right = NextDevicePathNode (Right);\r
+      }\r
+\r
       if (((DevicePathSubType (Left) != MSG_IPv4_DP) || (DevicePathSubType (Right) != MSG_IPv4_DP)) &&\r
           ((DevicePathSubType (Left) != MSG_IPv6_DP) || (DevicePathSubType (Right) != MSG_IPv6_DP)) &&\r
           ((DevicePathSubType (Left) != MSG_URI_DP)  || (DevicePathSubType (Right) != MSG_URI_DP))\r