diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-26 09:29:46 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-26 09:29:46 +0000 |
commit | 501793fad4084c43828ba2f4e2d9355d29abe9f7 (patch) | |
tree | ac49b115a60da8a6d1fd0ae42eff53c29d113acb /MdeModulePkg/Universal/Network/IScsiDxe | |
parent | 8f5e3a12a9dc5f5b782204ee655db6cb22e25ea5 (diff) | |
download | edk2-platforms-501793fad4084c43828ba2f4e2d9355d29abe9f7.tar.xz |
Adopt new IPv4/IPv6 device path for network modules.
Signed-off-by: tye
Reviewed-by: niruiyu
Adopt SasEx and new IPv6 device path for DevicePathDxe driver.
Signed-off-by: niruiyu
Reviewed-by: erictian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12574 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
4 files changed, 26 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h index 59d514fe18..f6a64e56da 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h @@ -41,9 +41,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _ISCSI_CHAP_AUTH_CONFIG_NVDATA {
UINT8 CHAPType;
- CHAR8 CHAPName[ISCSI_CHAP_NAME_MAX_LEN];
+ CHAR8 CHAPName[ISCSI_CHAP_NAME_STORAGE];
CHAR8 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
- CHAR8 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN];
+ CHAR8 ReverseCHAPName[ISCSI_CHAP_NAME_STORAGE];
CHAR8 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
} ISCSI_CHAP_AUTH_CONFIG_NVDATA;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h index 85ad3d173e..7c2e4e65fa 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h @@ -73,6 +73,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define ISCSI_CHAP_SECRET_STORAGE 17
#define ISCSI_CHAP_NAME_MAX_LEN 126
+#define ISCSI_CHAP_NAME_STORAGE 127
#define ISID_CONFIGURABLE_MIN_LEN 6
#define ISID_CONFIGURABLE_MAX_LEN 12
@@ -96,9 +97,9 @@ typedef struct { UINT8 TargetInfoFromDhcp;
UINT8 CHAPType;
- CHAR16 CHAPName[ISCSI_CHAP_NAME_MAX_LEN];
+ CHAR16 CHAPName[ISCSI_CHAP_NAME_STORAGE];
CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
- CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN];
+ CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_STORAGE];
CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE];
CHAR16 IsId[ISID_CONFIGURABLE_STORAGE];
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c index 840692b45d..5341e5a01e 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c @@ -757,7 +757,19 @@ IScsiGetTcpConnDevicePath ( ) {
DPathNode->Ipv4.LocalPort = 0;
- DPathNode->Ipv4.StaticIpAddress = (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
+ DPathNode->Ipv4.StaticIpAddress =
+ (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
+
+ IP4_COPY_ADDRESS (
+ &DPathNode->Ipv4.GatewayIpAddress,
+ &Session->ConfigData.NvData.Gateway
+ );
+
+ IP4_COPY_ADDRESS (
+ &DPathNode->Ipv4.SubnetMask,
+ &Session->ConfigData.NvData.SubnetMask
+ );
+
break;
}
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index 3836053d93..331f9d8d22 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -693,6 +693,14 @@ IScsiProcessLoginRsp ( if ((Conn->CurrentStage == ISCSI_SECURITY_NEGOTIATION) && (Conn->CHAPStep == ISCSI_CHAP_INITIAL)) {
//
+ // If the Login Request is a leading Login Request, the target MUST use
+ // the value presented in CmdSN as the target value for ExpCmdSN.
+ //
+ if ((Session->State == SESSION_STATE_FREE) && (Session->CmdSN != LoginRsp->ExpCmdSN)) {
+ return EFI_PROTOCOL_ERROR;
+ }
+
+ //
// It's the initial Login Response, initialize the local ExpStatSN, MaxCmdSN
// and ExpCmdSN.
//
|