summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-10-24 11:20:44 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-10-27 10:20:07 +0800
commit5e146cd9796ab5b79e5d426fed91f7864e3280c7 (patch)
tree3044b89ec3df576beaf87c93dccab3d06eb5818d /NetworkPkg
parent861218740d6d0f6b443f4ef6e170f9524372add8 (diff)
downloadedk2-5e146cd9796ab5b79e5d426fed91f7864e3280c7.zip
edk2-5e146cd9796ab5b79e5d426fed91f7864e3280c7.tar.gz
edk2-5e146cd9796ab5b79e5d426fed91f7864e3280c7.tar.bz2
NetworkPkg/IScsiDxe: Clear the old IFR TargetIp to avoid sharing it with other attempts.
Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Tested-by: Karunakar P <karunakarp@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfig.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index 3ce37c5..3382982 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -541,6 +541,7 @@ IScsiConvertAttemptConfigDataToIfrNvData (
IScsiIpToStr (&Ip, FALSE, IfrNvData->SubnetMask);
CopyMem (&Ip.v4, &SessionConfigData->Gateway, sizeof (EFI_IPv4_ADDRESS));
IScsiIpToStr (&Ip, FALSE, IfrNvData->Gateway);
+ ZeroMem (IfrNvData->TargetIp, sizeof (IfrNvData->TargetIp));
if (SessionConfigData->TargetIp.v4.Addr[0] != '\0') {
CopyMem (&Ip.v4, &SessionConfigData->TargetIp, sizeof (EFI_IPv4_ADDRESS));
IScsiIpToStr (&Ip, FALSE, IfrNvData->TargetIp);