]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process.
authorJiaxin Wu <jiaxin.wu@intel.com>
Mon, 16 Oct 2017 06:53:09 +0000 (14:53 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 26 Oct 2017 08:19:45 +0000 (16:19 +0800)
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 <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>
Reviewed-by: Karunakar p <karunakarp@amiindia.co.in>
NetworkPkg/IScsiDxe/IScsiMisc.c

index efd05cfbd404135f8ec70259bb137e69ec1c0b28..0a0a3f53e197473790d43489bb390cd3ec8e287f 100644 (file)
@@ -1994,9 +1994,12 @@ IScsiGetConfigData (
 \r
           continue;\r
         }\r
-      } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && !AttemptTmp->ValidPath) {\r
+      } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && \r
+                 !AttemptTmp->ValidPath && \r
+                 AttemptTmp->NicIndex == mPrivate->CurrentNic) {\r
         //\r
-        // Get DHCP information for already added, but failed, attempt.\r
+        // If the attempt associates with the current NIC, we can \r
+        // get DHCP information for already added, but failed, attempt.\r
         //\r
         AttemptTmp->DhcpSuccess = FALSE;\r
         if (!mPrivate->Ipv6Flag && (AttemptTmp->SessionConfigData.IpMode == IP_MODE_IP4)) {\r