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>
This commit is contained in:
Jiaxin Wu 2016-06-02 14:50:07 +08:00
parent 7570696c57
commit 08c6239d03
1 changed files with 9 additions and 9 deletions

View File

@ -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.