NetworkPkg/HttpBootDxe: Fix the incorrect error message output.

For IPv6 case, if one invalid URL returned from DHCP server, HttpBootDxe
driver could not retrieve the URL host address from DNS server. In such a
case, the error message should be printed as:
  Error: Could not retrieve the host address from DNS server.
Instead of:
  Error: Could not discover the boot information for DHCP server.
Then, we can still output as following:
  Error: Could not retrieve NBP file size from HTTP server.

Besides, currently implementation in HttpBootLoadFile will always output
error message even the HTTP process is correct.

This patch is to fix above issue.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
(cherry picked from commit f33d39949b)
This commit is contained in:
Jiaxin Wu
2018-03-01 12:59:57 +08:00
parent 8be643d1f0
commit d6711a2751
2 changed files with 21 additions and 17 deletions

View File

@ -474,6 +474,7 @@ HttpBootDhcp6ExtractUriInfo (
Status = HttpBootDns (Private, HostNameStr, &IpAddr);
FreePool (HostNameStr);
if (EFI_ERROR (Status)) {
AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n");
goto Error;
}
}