]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Fix IPv6 boot failure in diff net segment issue
authorJiaxin Wu <jiaxin.wu@intel.com>
Thu, 2 Jun 2016 06:50:07 +0000 (14:50 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Mon, 13 Jun 2016 04:03:39 +0000 (12:03 +0800)
This patch is used to fix HTTP IPv6 boot failure in diff net segment
issue. IPv6 gateway address should be registered before DNS query,
otherwise, DNS query will fail.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
NetworkPkg/HttpBootDxe/HttpBootClient.c

index 378bf02880808b0df0d8b7cc6af3a3526b6f8e8f..e543d9f883035a3adafd8ccaa865d005fce2f5e8 100644 (file)
@@ -300,6 +300,14 @@ HttpBootDhcp6ExtractUriInfo (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
+  //\r
+  // Register the IPv6 gateway address to the network device.\r
+  //\r
+  Status = HttpBootSetIp6Gateway (Private);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
   \r
   //\r
   // Configure the default DNS server if server assigned.\r
@@ -356,15 +364,7 @@ HttpBootDhcp6ExtractUriInfo (
     }  \r
   } \r
   \r
-  CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));  \r
-    \r
-  //\r
-  // register the IPv6 gateway address to the network device.\r
-  //\r
-  Status = HttpBootSetIp6Gateway (Private);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
+  CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));\r
   \r
   //\r
   // Extract the port from URL, and use default HTTP port 80 if not provided.\r