diff options
author | Ye Ting <ting.ye@intel.com> | 2014-09-24 09:35:54 +0000 |
---|---|---|
committer | tye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-24 09:35:54 +0000 |
commit | b22203212a892137e8da9501d42f58c022d61289 (patch) | |
tree | ad9445c35959cfd4cf2dc00d418dfe8315afdf00 /NetworkPkg/IScsiDxe | |
parent | d28c4ed72bb390b1152c114b0b34374428956871 (diff) | |
download | edk2-platforms-b22203212a892137e8da9501d42f58c022d61289.tar.xz |
Enhance TargetName check when save iSCSI configuration.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16168 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/IScsiDxe')
-rw-r--r-- | NetworkPkg/IScsiDxe/IScsiConfig.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c index 1d648f78bd..c6b48c651b 100644 --- a/NetworkPkg/IScsiDxe/IScsiConfig.c +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c @@ -541,7 +541,24 @@ IScsiConvertIfrNvDataToAttemptConfigData ( );
return EFI_INVALID_PARAMETER;
}
+
+ //
+ // Validate iSCSI target name configuration again:
+ // The format of iSCSI target name is already verified in IScsiFormCallback() when
+ // user input the name; here we only check the case user does not input the name.
+ //
+ if (Attempt->SessionConfigData.TargetName[0] == '\0') {
+ CreatePopUp (
+ EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+ &Key,
+ L"iSCSI target name is NULL!",
+ NULL
+ );
+ return EFI_INVALID_PARAMETER;
+ }
}
+
+
//
// Validate the authentication info.
//
@@ -2355,7 +2372,7 @@ IScsiFormCallback ( &Key,
L"Invalid iSCSI Name!",
NULL
- );
+ );
} else {
AsciiStrCpy (Private->Current->SessionConfigData.TargetName, IScsiName);
}
|