From 08c6239d03876ca4df618a499d674d8b04545976 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Thu, 2 Jun 2016 14:50:07 +0800 Subject: 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 Cc: Zhang Lubo Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Zhang Lubo --- NetworkPkg/HttpBootDxe/HttpBootClient.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'NetworkPkg/HttpBootDxe') 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. -- cgit v1.2.3