]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootClient.c
NetworkPkg: Fix IPv6 boot failure in diff net segment issue
[mirror_edk2.git] / 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