1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
2. Fix the driver binding Stop() hang issue in the network stack. 3. Add Ip4 raw data support. 4. Add iSCSI Dhcp option 60 support. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13995 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
iSCSI DHCP6 related configuration routines.
|
||||
|
||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -250,6 +250,7 @@ IScsiDhcp6ParseReply (
|
||||
EFI_DHCP6_PACKET_OPTION *BootFileOpt;
|
||||
EFI_DHCP6_PACKET_OPTION **OptionList;
|
||||
ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData;
|
||||
UINT16 ParaLen;
|
||||
|
||||
OptionCount = 0;
|
||||
BootFileOpt = NULL;
|
||||
@@ -282,7 +283,7 @@ IScsiDhcp6ParseReply (
|
||||
if (OptionList[Index]->OpCode == DHCP6_OPT_DNS_SERVERS) {
|
||||
|
||||
if (((OptionList[Index]->OpLen & 0xf) != 0) || (OptionList[Index]->OpLen == 0)) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto Exit;
|
||||
}
|
||||
//
|
||||
@@ -302,6 +303,24 @@ IScsiDhcp6ParseReply (
|
||||
// The server sends this option to inform the client about an URL to a boot file.
|
||||
//
|
||||
BootFileOpt = OptionList[Index];
|
||||
} else if (OptionList[Index]->OpCode == DHCP6_OPT_BOOT_FILE_PARA) {
|
||||
//
|
||||
// The server sends this option to inform the client about DHCP6 server address.
|
||||
//
|
||||
if (OptionList[Index]->OpLen < 18) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto Exit;
|
||||
}
|
||||
//
|
||||
// Check param-len 1, should be 16 bytes.
|
||||
//
|
||||
CopyMem (&ParaLen, &OptionList[Index]->Data[0], sizeof (UINT16));
|
||||
if (NTOHS (ParaLen) != 16) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
CopyMem (&ConfigData->DhcpServer, &OptionList[Index]->Data[2], sizeof (EFI_IPv6_ADDRESS));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +424,7 @@ IScsiDoDhcp6 (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
Oro = AllocateZeroPool (sizeof (EFI_DHCP6_PACKET_OPTION) + 3);
|
||||
Oro = AllocateZeroPool (sizeof (EFI_DHCP6_PACKET_OPTION) + 5);
|
||||
if (Oro == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_EXIT;
|
||||
@@ -416,9 +435,10 @@ IScsiDoDhcp6 (
|
||||
// All members in EFI_DHCP6_PACKET_OPTION are in network order.
|
||||
//
|
||||
Oro->OpCode = HTONS (DHCP6_OPT_REQUEST_OPTION);
|
||||
Oro->OpLen = HTONS (2 * 2);
|
||||
Oro->OpLen = HTONS (2 * 3);
|
||||
Oro->Data[1] = DHCP6_OPT_DNS_SERVERS;
|
||||
Oro->Data[3] = DHCP6_OPT_BOOT_FILE_URL;
|
||||
Oro->Data[5] = DHCP6_OPT_BOOT_FILE_PARA;
|
||||
|
||||
InfoReqReXmit.Irt = 4;
|
||||
InfoReqReXmit.Mrc = 1;
|
||||
|
Reference in New Issue
Block a user