NetworkPkg: Add dns support for pxe boot based on IPv6.
The BootFileURL option (59) in dhcpv6 is used to deliver the next server address with bootfile name, as an example "tftp://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]/BOOTFILE_NAME; mode=octet", it can also be “tftp://domain_name/BOOTFILE_NAME; mode=octet”, this patch is to support this case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@@ -620,10 +620,20 @@ PxeBcDhcp6BootInfo (
|
||||
|
||||
ASSERT (Cache6->OptList[PXEBC_DHCP6_IDX_BOOT_FILE_URL] != NULL);
|
||||
|
||||
//
|
||||
// Set the station address to IP layer.
|
||||
//
|
||||
Status = PxeBcSetIp6Address (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Parse (m)tftp server ip address and bootfile name.
|
||||
//
|
||||
Status = PxeBcExtractBootFileUrl (
|
||||
Private,
|
||||
&Private->BootFileName,
|
||||
&Private->ServerIp.v6,
|
||||
(CHAR8 *) (Cache6->OptList[PXEBC_DHCP6_IDX_BOOT_FILE_URL]->Data),
|
||||
@@ -633,14 +643,6 @@ PxeBcDhcp6BootInfo (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Set the station address to IP layer.
|
||||
//
|
||||
Status = PxeBcSetIp6Address (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Parse the value of boot file size.
|
||||
//
|
||||
|
Reference in New Issue
Block a user