]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UefiBootManagerLib: Support DNS device path description
authorJiaxin Wu <jiaxin.wu@intel.com>
Tue, 24 Jan 2017 03:51:01 +0000 (11:51 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Mon, 14 Aug 2017 05:18:37 +0000 (13:18 +0800)
This patch is to update UEFI Boot manager to support DNS device path
for HTTP(S) network boot.

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: Ye Ting <ting.ye@intel.com>
MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c

index 6e69a1540a4552e15c8cdf350222192b3d03dd43..7647bac2d03711298d65ab13703ed9c7ea42f74f 100644 (file)
@@ -387,8 +387,8 @@ BmGetNetworkDescription (
   //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)\r
   //\r
   // The HTTP device path is like:\r
   //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)\r
   //\r
   // The HTTP device path is like:\r
-  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)/Uri(...)\r
-  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)/Uri(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]/Uri(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]/Uri(...)\r
   //\r
   while (!IsDevicePathEnd (DevicePath) &&\r
          ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
   //\r
   while (!IsDevicePathEnd (DevicePath) &&\r
          ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
@@ -437,6 +437,15 @@ BmGetNetworkDescription (
   } else {\r
     Ip = NULL;\r
   }\r
   } else {\r
     Ip = NULL;\r
   }\r
+  \r
+  //\r
+  // Skip the optional DNS node\r
+  //\r
+  if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
+      (DevicePathSubType (DevicePath) == MSG_DNS_DP)\r
+      ) {\r
+    DevicePath = NextDevicePathNode (DevicePath);\r
+  }\r
 \r
   //\r
   // Locate the URI node\r
 \r
   //\r
   // Locate the URI node\r