summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2016-06-02 14:50:07 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2016-06-13 12:03:39 +0800
commit08c6239d03876ca4df618a499d674d8b04545976 (patch)
tree244e60c416c9bc46f4b5fde187e6afdb0b34480d /NetworkPkg/HttpBootDxe
parent7570696c57d446f163050c2befb78b8fc6cfeb02 (diff)
downloadedk2-08c6239d03876ca4df618a499d674d8b04545976.tar.gz
edk2-08c6239d03876ca4df618a499d674d8b04545976.tar.bz2
edk2-08c6239d03876ca4df618a499d674d8b04545976.zip
NetworkPkg: Fix IPv6 boot failure in diff net segment issue
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>
Diffstat (limited to 'NetworkPkg/HttpBootDxe')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootClient.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c
index 378bf02880..e543d9f883 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootClient.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c
@@ -300,6 +300,14 @@ HttpBootDhcp6ExtractUriInfo (
if (EFI_ERROR (Status)) {
return Status;
}
+
+ //
+ // Register the IPv6 gateway address to the network device.
+ //
+ Status = HttpBootSetIp6Gateway (Private);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Configure the default DNS server if server assigned.
@@ -356,15 +364,7 @@ HttpBootDhcp6ExtractUriInfo (
}
}
- CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
-
- //
- // register the IPv6 gateway address to the network device.
- //
- Status = HttpBootSetIp6Gateway (Private);
- if (EFI_ERROR (Status)) {
- return Status;
- }
+ CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
//
// Extract the port from URL, and use default HTTP port 80 if not provided.