]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c
MdeModulePkg/UefiBootManagerLib: Support DNS device path description
[mirror_edk2.git] / 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(...)]/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
@@ -437,6 +437,15 @@ BmGetNetworkDescription (
   } 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