summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2013-12-10 09:14:39 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-12-10 09:14:39 +0000
commit0e0fb74a067a1be9d3395a1f37f8645cc0a885d5 (patch)
tree3d1a3bfc8c5a5cd12b12c272955d9d2e024b1616 /NetworkPkg
parent62eeb52af7efe656f518baf59555e29c15bfa3be (diff)
downloadedk2-0e0fb74a067a1be9d3395a1f37f8645cc0a885d5.tar.gz
edk2-0e0fb74a067a1be9d3395a1f37f8645cc0a885d5.tar.bz2
edk2-0e0fb74a067a1be9d3395a1f37f8645cc0a885d5.zip
1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h.
2. Fix ISCSI iBFT's CHAP type mismatch bug caused by 14918. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Dong, Guo <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14953 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/IScsiDxe/IScsiIbft.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiIbft.c b/NetworkPkg/IScsiDxe/IScsiIbft.c
index 9dba4e6f36..3c179bfc51 100644
--- a/NetworkPkg/IScsiDxe/IScsiIbft.c
+++ b/NetworkPkg/IScsiDxe/IScsiIbft.c
@@ -1,7 +1,7 @@
/** @file
Implementation for iSCSI Boot Firmware Table publication.
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, 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
@@ -359,9 +359,13 @@ IScsiFillNICAndTargetSections (
Target->Port = NvData->TargetPort;
if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_CHAP) {
- Target->CHAPType = AuthConfig->CHAPType;
+ if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;
+ } else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;
+ }
} else if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_NONE) {
- Target->CHAPType = ISCSI_AUTH_TYPE_NONE;
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;
}
Target->NicIndex = (UINT8) Index;
@@ -402,7 +406,7 @@ IScsiFillNICAndTargetSections (
Target->CHAPSecretLength = Length;
Target->CHAPSecretOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
- if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {
+ if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {
//
// Reverse CHAP Name.
//