From 067ca8382201a7a8d7c44b03f117482e5a2306e6 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Mon, 16 Oct 2017 14:53:09 +0800 Subject: NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process. The existing attempt should not trigger the DHCP process if it doesn't associates with the current NIC. That's incorrect when displaying the initiator info in attempt page. Cc: Karunakar P Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Karunakar p --- NetworkPkg/IScsiDxe/IScsiMisc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'NetworkPkg/IScsiDxe') diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index efd05cfbd4..0a0a3f53e1 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -1994,9 +1994,12 @@ IScsiGetConfigData ( continue; } - } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && !AttemptTmp->ValidPath) { + } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && + !AttemptTmp->ValidPath && + AttemptTmp->NicIndex == mPrivate->CurrentNic) { // - // Get DHCP information for already added, but failed, attempt. + // If the attempt associates with the current NIC, we can + // get DHCP information for already added, but failed, attempt. // AttemptTmp->DhcpSuccess = FALSE; if (!mPrivate->Ipv6Flag && (AttemptTmp->SessionConfigData.IpMode == IP_MODE_IP4)) { -- cgit v1.2.3