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 <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <[email protected]>
---
 NetworkPkg/IScsiDxe/IScsiMisc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index efd05cf..0a0a3f5 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -1992,13 +1992,16 @@ IScsiGetConfigData (
                  AttemptTmp
                  );
 
           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)) {
           Status = IScsiDoDhcp (Private->Image, Private->Controller, 
AttemptTmp);
           if (!EFI_ERROR (Status)) {
-- 
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to